Fork me on GitHub
摘要: https://www.luogu.org/problem/show?pid=1101#sub#include#include#include#include#include#include#includeusing namespace std;int dx[]={0,1,1,1,... 阅读全文
posted @ 2017-03-26 10:01 primes 阅读(211) 评论(0) 推荐(0)
摘要: https://www.vijos.org/p/1094差分约束: 用#include#include #include#include#include#includeusing namespace std;int n,m,times[1009];int num[10009*2],... 阅读全文
posted @ 2017-03-24 15:39 primes 阅读(213) 评论(0) 推荐(0)
摘要: https://www.luogu.org/problem/show?pid=1605#subdfs#include#include#include#include#include#include#includeusing namespace std;int ans=0,n,m,t... 阅读全文
posted @ 2017-03-19 11:32 primes 阅读(144) 评论(0) 推荐(0)
摘要: https://www.luogu.org/problem/show?pid=3388#sub#include#include#include#include#include#include#includeusing namespace std;int dfn[100009],lo... 阅读全文
posted @ 2017-03-19 10:05 primes 阅读(128) 评论(0) 推荐(0)
摘要: #include#include#include#include#include#include#includeusing namespace std;int dfn[1001],low[1001],dfs_num=0,n,m,cnt=0,root;int num[2001],n... 阅读全文
posted @ 2017-03-19 09:58 primes 阅读(177) 评论(0) 推荐(0)
摘要: https://www.luogu.org/problem/show?pid=1339Dijkstra最短路#include#include#include#include#include#include#includeusing namespace std;int w[2501]... 阅读全文
posted @ 2017-03-17 17:22 primes 阅读(207) 评论(0) 推荐(0)
摘要: https://www.luogu.org/problem/show?pid=1801#sub用对顶堆来做: 上次输出第s小的数,在大根堆里储存s数(这个状态需要维护),在小根堆里存剩下的数,下一次输出时输出小根堆的顶,即是需要输出的值,s++#include#include#in... 阅读全文
posted @ 2017-03-17 16:28 primes 阅读(142) 评论(0) 推荐(0)
摘要: #include#include#include#include#include#include#include using namespace std;int n,m,ans=0;struct H{ int p,a;}milk[5009];int my_comp(const... 阅读全文
posted @ 2017-03-17 15:12 primes 阅读(176) 评论(0) 推荐(0)
摘要: https://www.luogu.org/record/lists?pid=P1204维护区间#include#include#include#include#include#include#include using namespace std;int n,max1=0,max... 阅读全文
posted @ 2017-03-17 15:05 primes 阅读(228) 评论(0) 推荐(0)
摘要: https://www.luogu.org/problem/show?pid=1206#sub#include#include#include#include#include#include#include using namespace std;int B,a[1000],b[1... 阅读全文
posted @ 2017-03-15 18:04 primes 阅读(216) 评论(0) 推荐(0)