摘要:
So Easy! http://acm.hdu.edu.cn/showproblem.php?pid=4565 代码如下: #include<stdio.h> #include<cstring> #define N 2 #define LL long long int m=2; LL MOD; st 阅读全文
摘要:
In our daily life we often use 233 to express our feelings. Actually, we may say 2333, 23333, or 233333 ... in the same meaning. And here is the quest 阅读全文
摘要:
Codeforces Round #226 (Div. 2) E. Bear in the Field time limit per test 1 second memory limit per test 256 megabyte Our bear's forest has a checkered 阅读全文
摘要:
A. Visiting a Friend 水题,但是需要注意段点初,及最后的位置 代码如下: B. Coloring a Tree 额。。。也挺水的,dfs或bfs即可,起点任意一点即可 代码如下: C. Hashing Trees 找到规律,发现当a[i]>1&&a[i-1]>1是该树会出现异构, 阅读全文
摘要:
A. Splitting in Teams 水题贪心,数列有1,2两种元素,求组成3的最大方案,首先找到1的个数a,2的个数b,尽可能满足2,若b>=a,则就输出a,否则,输出b+(a-b)/3 代码如下: B. Months and Years 暴力,特别注意:相邻两年不可能都是润年,因为数据量很 阅读全文