摘要:
比赛链接:https://codeforces.com/contest/2025 A. Two Screens 看前面最长相同前缀,如果有就前缀长+1+剩余长度,否则直接两个字符串长度相加 #include<iostream> #include<string.h> #include<map> #in 阅读全文
摘要:
题目链接:https://codeforces.com/contest/1882 A. Increasing Sequence 从1开始慢慢和\(a[i]\)的所有值比较,注意最后一个位置特判下 #include<iostream> #include<string.h> #include<map> 阅读全文
摘要:
A. Simple Palindrome aeiou,如果这里后面+u则会多出2,+o则会多3,通过分析加相同的字母比加之前存在的不同字母赚 发现同一个太多了,又会增太大,遂平均分配,使增多幅度上升的缓慢 #include<bits/stdc++.h> using namespace std; ty 阅读全文
摘要:
题目链接:https://qoj.ac/contest/1480 这次有个强队去讲课,偶幸校队赛时第一 C - Catch You Catch Me 队友写的,签到题吧? #include<bits/stdc++.h> #define endl '\n' using namespace std; t 阅读全文
摘要:
赛时依然和本校强队差两题 比赛链接:https://codeforces.com/gym/104901 A. Many Many Heads 这里先用栈处理好第一个状况,然后根据层数进行第二个状况是否存在判断 #include<bits/stdc++.h> using namespace std; 阅读全文
摘要:
这次double精度上卡了,赛时和学校强队差两题 题目链接:https://codeforces.com/gym/104023/problem A. Dunai 队友写的,答案在总冠军位人数和位置上冠军加非冠军人数最小取min? #include<bits/stdc++.h> #define tes 阅读全文
摘要:
比赛链接:https://www.luogu.com.cn/contest/179008 A.Strange Cake Game 对于小W,往下走最赚,对于小M往右走最赚,于是路线形成了个折线,直接对应竖坐标位置去看看横坐标符不符合要求即可 #include<iostream> #include<a 阅读全文
摘要:
比赛链接https://www.luogu.com.cn/contest/126344 [APC001] A - CT 不必多说,多次取模 #include<iostream> #include<algorithm> #include<string> #include<string.h> #incl 阅读全文
摘要:
A. Find Minimum Operations 暴力枚举 #include<iostream> #include<algorithm> #include<string> #include<string.h> #include<queue> #include<deque> #include<ma 阅读全文
摘要:
B - Magical Subsequence https://codeforces.com/gym/103447/problem/B 桶+stack,这里用map会TLE stack用一次时间复杂度\(O(1)\) \(156ms/1000ms\) #include<iostream> #incl 阅读全文