上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 57 下一页

2015年1月9日

【HDOJ】2802 F(N)

摘要: 找循环节水题。注意余数大于0。 1 /* 2802 */ 2 #include 3 #include 4 #include 5 6 #define MAXN 4018 7 #define MOD 2009 8 9 __int64 a[MAXN+1];10 11 void init() {... 阅读全文

posted @ 2015-01-09 10:28 Bombe 阅读(107) 评论(0) 推荐(0) 编辑

2015年1月7日

【HDOJ】1107 武林

摘要: 简单模拟,题目数据太弱太弱了。 1 /* 1107 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 typedef str... 阅读全文

posted @ 2015-01-07 22:24 Bombe 阅读(294) 评论(0) 推荐(0) 编辑

【HDOJ】5017 Ellipsoid

摘要: 简单地模拟退火。 1 /* 5017 */ 2 #include 3 #include 4 #include 5 #include 6 7 #define INF 1e30 8 9 const double eps = 1e-8;10 const double next = 0.99;1... 阅读全文

posted @ 2015-01-07 20:37 Bombe 阅读(151) 评论(0) 推荐(0) 编辑

【HDOJ】1109 Run Away

摘要: 基础模拟退火。 1 /* poj 1379 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 #define MAXN 10... 阅读全文

posted @ 2015-01-07 18:51 Bombe 阅读(167) 评论(0) 推荐(0) 编辑

【HDOJ】2440 Watch out the Animal

摘要: 刚开始学随机算法,凸包+模拟退火。 1 /* 2440 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 #define M... 阅读全文

posted @ 2015-01-07 11:30 Bombe 阅读(158) 评论(0) 推荐(0) 编辑

2015年1月5日

【HDOJ】4325 Flowers

摘要: 树状数组+离散化的题目,一直在思考为什么结果不一样,后来才发现花开了就是开了不会再谢了。 1 /* 4325 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 #def... 阅读全文

posted @ 2015-01-05 21:52 Bombe 阅读(122) 评论(0) 推荐(0) 编辑

2015年1月4日

【HDOJ】5154 Harry and Magical Computer

摘要: 拓扑排序。 1 /* 5154 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 #define MAXN 10511 12 vector ve... 阅读全文

posted @ 2015-01-04 19:35 Bombe 阅读(157) 评论(0) 推荐(0) 编辑

2015年1月3日

【HDOJ】3285 Convex Hull of Lattice Points

摘要: 凸包模板题目。 1 /* 3285 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 #define MAXN 5510 11 typedef struct {12 ... 阅读全文

posted @ 2015-01-03 22:12 Bombe 阅读(233) 评论(0) 推荐(0) 编辑

2015年1月2日

【HDOJ】1348 Wall

摘要: 计算几何-凸包模板题目,Graham算法解。 1 /* 1348 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 #define MAXN 1... 阅读全文

posted @ 2015-01-02 21:56 Bombe 阅读(256) 评论(0) 推荐(0) 编辑

【HDOJ】4628 Pieces

摘要: 最开始的想法是搜索,发现不对,后来发现数据量很小,可以状态压缩+DP。 1 /* 4628 */ 2 #include 3 #include 4 #include 5 6 #define MAXN 17 7 #define INF 9999 8 9 char s[MAXN];10 ... 阅读全文

posted @ 2015-01-02 16:54 Bombe 阅读(175) 评论(0) 推荐(0) 编辑

上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 57 下一页

导航