随笔分类 - Codeforces
摘要:1073D. Berland Fair每次先走一圈,计算出可以购买的糖果的总价格 c 和总个数 t,然后 cnt += t*(T/c) T %= c,循环至无糖果可买。时间复杂度计算如下:#includeusing namespace std;const int m...
阅读全文
摘要:1073C. Vasya and Robot注意如果 d 和 n 奇偶性不一致则是不可能到达的,因为机器人每移动一步,其坐标之和的奇偶性就会发生变化。#includeusing namespace std;typedef pairP;const int maxn = ...
阅读全文
摘要:1073B. Vasya and Books#includeusing namespace std;const int maxn = 2*100000 + 5;int n,s[maxn],t[maxn],vis[maxn],res[maxn];int main(){ ...
阅读全文
摘要:1073A. Diverse Substring只要不是一串完全相同的字母就是 YES,因为至少有一个长度为2的子串是 diverse 的。傻傻地测试了所有的子串。。
阅读全文

浙公网安备 33010602011771号