摘要: 搞了一下午,枚举顺序要注意....然后数据类型.... 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <queue> 5 #include <map> 6 #include <ctime> 7 #include <cmath> 8 #include <algorithm> 9 using namespace std;10 #define LL long long11 LL dp[1000001];1 阅读全文
posted @ 2013-05-22 17:17 Naix_x 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 比赛的时候,大体还是想出来了,有些细节没想好,虎哥提示了下,我写写代码,过了样例,就过了。。。智商拙计啊。。。看题看了好一会,才看懂题意,想了好一会,最后还没写出来。。。 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <queue> 5 #include <map> 6 #include <ctime> 7 #include <cmath> 8 #include <algorithm> 9 usin 阅读全文
posted @ 2013-05-22 14:10 Naix_x 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 学习模拟退火,讲解看这里:http://www.cnblogs.com/heaad/archive/2010/12/20/1911614.html代码看的山大一个大神的博客:http://3214668848.blog.163.com/blog/static/48764919200991894621558/代码里就一个随机数,实现模拟退火算法的代码,比较好懂的。。。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: fence3 5 */ 6 #include <iostream> 7 #include <cstdio> 8 #include 阅读全文
posted @ 2013-05-22 10:48 Naix_x 阅读(200) 评论(0) 推荐(0) 编辑