什么也不用说,并查集裸题,直接盲敲即可。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 11 int f...
分类:
其他好文 时间:
2014-07-22 22:47:33
阅读次数:
207
题目链接题意 : 给你每个柿子树的位置,给你已知长宽的矩形,让这个矩形包含最多的柿子树。输出数目思路 :数据不是很大,暴力一下就行,也可以用二维树状数组来做。 1 //2029 2 #include 3 #include 4 #include 5 6 using namespace std ...
分类:
其他好文 时间:
2014-07-22 22:41:34
阅读次数:
298
Now I believe thoughts leading to DP is brutal DFS.. DFS is brutal force enumeration, but that's too much and naive. We need pruning. So, DFS + Prunin...
分类:
其他好文 时间:
2014-07-22 22:40:34
阅读次数:
183
E. Invitation CardsTime Limit: 8000msMemory Limit: 262144KB64-bit integer IO format:%lld Java class name:MainIn the age of television, not many people...
分类:
其他好文 时间:
2014-07-22 22:37:14
阅读次数:
278
Invitation CardsDescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this f...
分类:
其他好文 时间:
2014-07-22 22:35:15
阅读次数:
238
我已经两次因为不恰当的省略go中的函数返回值,一次造成MySql的too many connection错误,一次造成严重的内存泄漏。所以在这里大家分享一下这个问题和解决办法,也提醒自己以后不要再犯类似的错了。 众所周知,g...
分类:
其他好文 时间:
2014-07-22 22:33:12
阅读次数:
227
TilingTime Limit:1000MSMemory Limit:65536KTotal Submissions:7509Accepted:3672DescriptionIn how many ways can you tile a 2xn rectangle by 2x1 or 2x2 ti...
分类:
其他好文 时间:
2014-07-22 00:10:34
阅读次数:
265
C - Ubiquitous ReligionsTime Limit:5000 MSMemory Limit:65536 KB64-bit integer IO format:%I64d , %I64uJava class name:MainDescriptionThere are so many ...
分类:
其他好文 时间:
2014-07-22 00:03:34
阅读次数:
211
Description
FJ has purchased N (1
The treats are interesting for many reasons:
The treats are numbered 1..N and stored sequentially in single file in a long box that is open at both ends. On...
分类:
其他好文 时间:
2014-07-21 22:18:18
阅读次数:
227
Sum of Consecutive Prime Numbers
Description
Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given positive ...
分类:
其他好文 时间:
2014-07-21 22:18:12
阅读次数:
222