Codeforces
ACLJW
这个作者很懒,什么都没留下…
展开
-
1073B. Vasya and Books
1073B. Vasya and Books #include<bits/stdc++.h> using namespace std; const int maxn = 2*100000 + 5; int n,s[maxn],t[maxn],vis[maxn],res[maxn]; int main() { // freopen("data.in","r",stdin); ...原创 2018-10-29 22:33:47 · 297 阅读 · 0 评论 -
1073A. Diverse Substring
1073A. Diverse Substring 只要不是一串完全相同的字母就是 YES,因为至少有一个长度为2的子串是 diverse 的。 傻傻地测试了所有的子串。。原创 2018-10-29 22:30:37 · 179 阅读 · 0 评论 -
1073C. Vasya and Robot
1073C. Vasya and Robot 注意如果 d 和 n 奇偶性不一致则是不可能到达的,因为机器人每移动一步,其坐标之和的奇偶性就会发生变化。 #include<bits/stdc++.h> using namespace std; typedef pair<int,int>P; const int maxn = 200000 + 5; int n,x,...原创 2018-10-31 22:39:41 · 150 阅读 · 0 评论 -
1073D. Berland Fair
1073D. Berland Fair 每次先走一圈,计算出可以购买的糖果的总价格 c 和总个数 t,然后 cnt += t*(T/c) T %= c,循环至无糖果可买。 时间复杂度计算如下: #include<bits/stdc++.h> using namespace std; const int maxn = 200000 + 5; typedef long lon...原创 2018-10-31 23:54:20 · 118 阅读 · 0 评论