(最近水题刷的比较多,不过还是有些收获,所以还是做个记录比较好)
http://acm.hdu.edu.cn/showproblem.php?pid=1282
分析:
题目理解起来还是简单的,基本上有两种思路:1) 将int转为string来实现; 2)直接用int做(回文串判断,相加)
第二中思路比较直接,将一个数倒置得到新的数,然后判断是否是回文数...
分类:
其他好文 时间:
2014-05-05 13:26:07
阅读次数:
276
hdu 1163 Eddy's digital Roots 九余数定理...
分类:
其他好文 时间:
2014-05-05 13:03:16
阅读次数:
232
Ignatius and the Princess IV
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32767K (Java/Other)
Total Submission(s) : 7 Accepted Submission(s) : 3
Font: Times New Roman | Verdana | ...
分类:
其他好文 时间:
2014-05-05 13:01:52
阅读次数:
325
食物链
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 41805
Accepted: 12160
Description
动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。
现有N个动物,以1-N编号。每个动物都...
分类:
其他好文 时间:
2014-05-04 12:42:36
阅读次数:
330
Poj-3922 A simple stone game
博弈,k倍动态减法详解...
分类:
其他好文 时间:
2014-05-04 00:21:34
阅读次数:
296
Super Jumping! Jumping! Jumping!
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 6 Accepted Submission(s) : 5
Font: Times New Roman | Verdan...
分类:
其他好文 时间:
2014-05-03 16:47:07
阅读次数:
262
Description
司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:
如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网...
分类:
其他好文 时间:
2014-05-03 15:44:45
阅读次数:
284
http://acm.hdu.edu.cn/showproblem.php?pid=1228
分析:
我只是想练习一下map的用法,不然又忘了。。。
代码:
//hdu 1228
#include
#include
#include
#include
#include
using namespace std;
map d;
void init()...
分类:
其他好文 时间:
2014-05-03 15:40:58
阅读次数:
232
#include
#include
#include
#include
#include
using namespace std;
#define N 20020
struct node{
int from, to, dou, nex;
}edge[N];
int head[N], edgenum;
void add(int u, int v,int dou){
node E={u,v,dou...
分类:
其他好文 时间:
2014-05-03 15:25:32
阅读次数:
340