上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: A题和B题是一如既往的签到题。 C题是一道拓扑序dp题,题意是给定一个DAG,问你从1号点走到n号点,在长度不超过T的情况下,要求经过的点数最多,换个思维,设dp[i][j]表示到i号点时经过j个点的最小距离,我们按拓扑序转移即可,最后找到一个最大的x,使得dp[n][x]<=T即可,由于还要输出路 阅读全文
posted @ 2016-10-01 20:02 oyzx~ 阅读(214) 评论(0) 推荐(0) 编辑
摘要: A,B,C傻逼题,就不说了。 E题: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 using namespace std; 7 c 阅读全文
posted @ 2016-09-24 17:47 oyzx~ 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 using namespace std; 7 const int maxn=40000 阅读全文
posted @ 2016-09-16 23:48 oyzx~ 阅读(133) 评论(0) 推荐(0) 编辑
摘要: FFT实质上做的是循环卷积,ck=sigam(ai*bj,(i+j)%n=k),其中n是倍长后的长度,所以我们有时候需要的只是普通的卷积,我们就需要把原数组倍长,再用FFT求卷积,由于高位都是0,所以做出来就等价于普通的卷积。 阅读全文
posted @ 2016-09-16 23:39 oyzx~ 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 using namespace std; 7 const int maxn=40000 阅读全文
posted @ 2016-09-16 23:36 oyzx~ 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 #include <cmath> 6 using namespace std; 7 const double PI=acos 阅读全文
posted @ 2016-09-16 23:32 oyzx~ 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 待更...... 阅读全文
posted @ 2016-08-31 17:29 oyzx~ 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 using namespace std; 7 typedef long long in 阅读全文
posted @ 2016-08-24 00:03 oyzx~ 阅读(200) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/liangzhaoyang1/article/details/52289666 阅读全文
posted @ 2016-08-23 22:49 oyzx~ 阅读(93) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/wzj-is-a-juruo/p/5619901.html 阅读全文
posted @ 2016-08-23 18:20 oyzx~ 阅读(104) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页