Fence RailsBurch, Kolstad, and SchrijversFarmer John is trying to erect a fence around part of his field. He has decided on the shape of the fence and...
分类:
其他好文 时间:
2014-07-16 00:08:30
阅读次数:
367
H - Gold Coins(2.4.1)
Time Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
The king pays his loyal knight in gold coins. On the first ...
分类:
其他好文 时间:
2014-07-15 13:14:28
阅读次数:
275
Gold Coins
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 20913
Accepted: 13098
Description
The king pays his loyal knight in gold coins. On the first day o...
分类:
其他好文 时间:
2014-07-13 20:45:45
阅读次数:
205
USER: Kevin Samuel [kevin_s1]
TASK: comehome
LANG: C++
Compiling...
Compile: OK
Executing...
Test 1: TEST OK [0.003 secs, 3376 KB]
Test 2: TEST OK [0.005 secs, 3376 KB]
Test 3: TEST OK [0.0...
分类:
其他好文 时间:
2014-07-12 19:26:53
阅读次数:
184
题目链接:http://poj.org/problem?id=2000题目大意:求N天得到多少个金币,第一天得到1个,第二、三天得到2个,第四、五、六天得到3个、、、、以此类推,得到第N天的金币数。 1 #include 2 #include 3 #include 4 using namesp...
分类:
其他好文 时间:
2014-07-12 08:51:24
阅读次数:
176
一块N x N(1
1:转90度:图案按顺时针转90度。
2:转180度:图案按顺时针转180度。
3:转270度:图案按顺时针转270度。
4:反射:图案在水平方向翻转(以中央铅垂线为中心形成原图案的镜像)。
5:组合:图案在水平方向翻转,然后再按照1到3之间的一种再次转换。
6:不改变:原图案不改变。
7:无效转换:无法用以上方法得到新图案。...
分类:
其他好文 时间:
2014-07-08 14:33:24
阅读次数:
161
写哭了,本来感觉是floyd,但是发现floyd根本不能连续地传递,然后看了题解写了个搜索,这个搜索我都没有想到= =
先贴个floyd的代码,先试图用DFS处理连续控股的情况,再用几个循环处理k1+k2+k3+...Kn
在第八组数据跪了
/*
ID:kevin_s1
PROG:concom
LANG:C++
*/
#include
#include
#include
#inclu...
分类:
其他好文 时间:
2014-07-06 09:52:55
阅读次数:
189
原题找不到了,应该是usaco之类的题目吧。给一个可以交题的链接:http://www.cqoi.net:2012/problem.php?id=1004思路:将素数一个一个往里乘,保证扫描的顺序是从小到大的就可以了。思路跟usaco training的丑数有点像,算是那道题的简单版吧。我的实现: ...
分类:
其他好文 时间:
2014-07-05 21:12:47
阅读次数:
256
在这里我只放我的模板和一些我个人的“理解”。。最大流测试题:usaco草地排水EK:时间复杂度:O(VE^2)代码复杂度:最易代码:#include #include #include using namespace std;#define CLR(a) memset(a, 0, sizeof(a)...
分类:
其他好文 时间:
2014-07-02 20:54:22
阅读次数:
276
裸0/1背包,就是从各种币种里面拿来凑足N元,求最多有多种方案。用dp[i][j]表示选前i个币种凑成j的方案数量
状态转移方程: dp[i][j] = dp[i- 1][j] j = coins[i]
/*
ID:kevin_s1
PROG:money
LANG:C++
*/
#include
#include
#include
#include
#include
#i...
分类:
其他好文 时间:
2014-07-01 09:29:13
阅读次数:
209