题目大意有些长度不同的巧克力棒排成一行,A从左往右吃,B从右往左吃。两人吃的速度相同,不允许暂停,不允许手中的还没吃完就吃下一个,当两个人手中的同时吃完并且下一个要吃的是相同的一个时这个巧克力棒归A吃。问他们最终都吃了几个。解题思路两个指针分别从左到右和从右到左。按照题目要求操作即可。...
分类:
其他好文 时间:
2015-02-20 09:43:16
阅读次数:
134
换了新ID,以前的ID 运气不好D:题目隐藏的很深啊!如果说拓扑排序肯定会写,模型转换。计算每个点'.'的度,度:周围4个点为'.'的数目。然后BFS 枚举度为1的点 ,一遍构造,链接的点就度--;再压入队列中当枚举的点数不够'.'数目时,答案就是'unique';题目没要你输出any 这本身有蹊跷...
分类:
其他好文 时间:
2015-02-19 22:58:51
阅读次数:
157
A题意:给出起点(0,0)以及终点(x,y),再给出步数s,这个人可以往上下左右四个方向走,问能不能恰好在s步走到终点先求出最小步数min,然后就可以认为这个人在磨蹭时间,走回去再走回来,在min的基础上加上2的倍数都是能够恰好到达的。 1 #include 2 #include 3 #in...
分类:
其他好文 时间:
2015-02-18 19:52:53
阅读次数:
204
A. Chewbaсca and Number感觉这道题巨坑,如果题中加粗标出来的输出得是正数算小坑的话。有个巨坑就是the final number shouldn't start with a zero.答案不能有前导0,我觉得这句话有两种理解:比如将9999变为9,算不算有前导0呢?把9当做一...
分类:
其他好文 时间:
2015-02-18 15:16:14
阅读次数:
279
昨天注册了没有打,晚上给长辈们敬完酒,回来就洗洗睡了,=_=||A. Drazil and Date题意:是否有可能恰好用s步,从原点走到(a, b)。分析:首先要走到终点至少要|a|+|b|步,如果还剩多余的步数的话,那就向右走一格再走回来。也就是s要比|a|+|b|多偶数步(包括0)才可以。B....
分类:
其他好文 时间:
2015-02-18 15:12:26
阅读次数:
209
D. Drazil and Tiles
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Drazil created a following problem abou...
分类:
编程语言 时间:
2015-02-18 14:09:31
阅读次数:
287
Drazil is playing a math game with Varda.Let’s define for positive integer x as a product of factorials of its digits. For example, .First, they choose a decimal number a consisting of n digits that co...
分类:
其他好文 时间:
2015-02-18 13:02:15
阅读次数:
103
B. Drazil and TilesDrazil created a following problem about putting 1?×?2 tiles into an n?×?m grid:"There is a grid with some cells that are empty and...
分类:
其他好文 时间:
2015-02-18 12:59:28
阅读次数:
152
B. Drazil and His Happy Friends
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Drazil has many friends. So...
分类:
移动开发 时间:
2015-02-18 11:56:33
阅读次数:
129
Codeforces Round #292 (Div. 2 Div. 1 ABCD未完待续)...
分类:
其他好文 时间:
2015-02-18 10:42:22
阅读次数:
225