摘要: 一开始写了一发很快的,发现一会能过一会不能,貌似有点悬,毕竟是随机算法。后来重写了一发迭代5遍的,基本上把把AC了= =模拟退火果然是一种不是很靠谱的算法。#include #include #include #include #include #include using namespace st... 阅读全文
posted @ 2014-09-15 22:04 acm_roll 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 网赛的时候感觉可以用模拟退火搞但是不会写,今天学了一下感觉模拟退火本身也不是很难= =#include #include #include #include using namespace std;const double eps = 1e-8;const double r = 0.99; //降温... 阅读全文
posted @ 2014-09-15 21:04 acm_roll 阅读(1960) 评论(3) 推荐(2) 编辑
摘要: 水题,证明有单调性之后直接照着拍就好#include #include #include #include using namespace std;#define sq(x) ((x)*(x))const int maxn = 10005;const int maxm = 5005;int f[ma... 阅读全文
posted @ 2014-09-15 20:25 acm_roll 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 这里的w显然满足速递变形不等式的规则,所以用四边形加速即可#include #include #include using namespace std;const int maxn = 1005;const int maxm = 1005;int w[maxn][maxn], sum[maxn], ... 阅读全文
posted @ 2014-09-15 19:32 acm_roll 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 开学没什么事情,抽出了一点时间学了一下python的最基本的东西,版本是python 2.7.8 通过内置变量__name__可以知道自己现在是处于执行状态还是作为一个模块引入的。 使用help()函数可以查看模块的帮助文档,python会根据注释自动生成帮助文档 使用dir(__builtins__)可以查看所有内置函数,当然也可以用来查看别的模块中的内容,当然查看之前要先import... 阅读全文
posted @ 2014-09-15 16:49 acm_roll 阅读(174) 评论(0) 推荐(0) 编辑