摘要: 1073D. Berland Fair每次先走一圈,计算出可以购买的糖果的总价格 c 和总个数 t,然后 cnt += t*(T/c) T %= c,循环至无糖果可买。时间复杂度计算如下:#includeusing namespace std;const int m... 阅读全文
posted @ 2018-10-31 23:54 ACLJW 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1073C. Vasya and Robot注意如果 d 和 n 奇偶性不一致则是不可能到达的,因为机器人每移动一步,其坐标之和的奇偶性就会发生变化。#includeusing namespace std;typedef pairP;const int maxn = ... 阅读全文
posted @ 2018-10-31 22:40 ACLJW 阅读(148) 评论(0) 推荐(0) 编辑