就是一次手速场啊,1000+个三道题的啊。还有就是一定要注意数据范围,好多人被查掉了。
A,再一次被样例坑了一下,注意是每个点相邻的o的个数是否都为偶数个。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include...
分类:
其他好文 时间:
2014-08-27 13:06:17
阅读次数:
251
A:
这道题目还是很简单的,做过很多遍了,类似于切割木板的问题。
把所有的数放在一个优先队列里,弹出两个最大的,然后合并,把结果放进去。依次进行。
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define LL __int64
#define IN...
分类:
其他好文 时间:
2014-08-27 13:05:07
阅读次数:
222
Codeforces Round #263 (Div. 2) proA...
分类:
其他好文 时间:
2014-08-27 09:29:27
阅读次数:
174
Codeforces Round #263 (Div. 2) proB...
分类:
其他好文 时间:
2014-08-27 09:29:17
阅读次数:
200
Codeforces Round #263 (Div. 2) proC...
分类:
其他好文 时间:
2014-08-27 09:29:07
阅读次数:
211
题目地址:http://codeforces.com/contest/461/problem/B
题目大意:给一棵树,每个点为白色或黑色,切断一些边,使得每个连通块有且仅有一个黑点,问划分方案数。
算法讨论:TreeDP。f[x][0..1]表示x所在连通块有0/1个黑点。设y为x的儿子,则DP方程为f[x][1]=f[x][1]*f[y][0]+f[x][1]*f[y][1]+f[x][0]...
分类:
移动开发 时间:
2014-08-27 09:25:57
阅读次数:
287
Sunny Cup 2003 - Preliminary RoundApril 20th, 12:00 - 17:00Problem E: QS NetworkIn the planet w-503 of galaxy cgb, there is a kind of intelligent crea...
分类:
其他好文 时间:
2014-08-26 22:45:56
阅读次数:
308
F - Knights of the Round Table
Time Limit:7000MS Memory Limit:65536KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
Being a knight is a very attractive career: s...
分类:
其他好文 时间:
2014-08-26 21:33:56
阅读次数:
277
460A Vasya and Socks
题意:n个物品每天用一个 m天得一个 问 最多连续用几天
思路:
没思路… 就是暴力…
代码:
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{
...
分类:
其他好文 时间:
2014-08-26 17:29:26
阅读次数:
244
这个是前几天作的比赛,因为今晚上还有CF所以就把前几天写的东西总结一下。
460A 直接模拟题意,不过我在作的过程中一直担心余数会对结果产生影响。
#include
#include
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
for(int i=n;;i++)
{...
分类:
其他好文 时间:
2014-08-26 13:41:28
阅读次数:
228