什么也不用说,并查集裸题,直接盲敲即可。 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
B. Get Many Persimmon TreesTime Limit: 1000msMemory Limit: 30000KB64-bit integer IO format:%lld Java class name:MainSubmitStatusSeiji Hayashi had been...
分类:
其他好文 时间:
2014-07-22 00:30:33
阅读次数:
296
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2014-07-22 00:28:36
阅读次数:
169
Ubiquitous ReligionsTime Limit:5000MSMemory Limit:65536KTotal Submissions:23390Accepted:11527DescriptionThere are so many different religions in the w...
分类:
其他好文 时间:
2014-07-22 00:19:33
阅读次数:
155
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