摘要: Description 维护一个序列,使它可以进行下面两种操作:1.在末尾添加一个数字x2.将整个序列变成第x次操作后的样子在每次操作后,输出当前序列的最长上升子序列的长度序列初始时为空 Description 维护一个序列,使它可以进行下面两种操作:1.在末尾添加一个数字x2.将整个序列变成第x次 阅读全文
posted @ 2018-08-05 19:43 Vagari 阅读(189) 评论(0) 推荐(0) 编辑
摘要: //有多少项N取多至少8~10倍 #include <algorithm> #include <cmath> #include <complex> #include <cstdlib> using namespace std; typedef complex<double> cn; const in 阅读全文
posted @ 2018-08-05 15:21 Vagari 阅读(151) 评论(0) 推荐(0) 编辑
摘要: #include <queue> #include <memory.h> using namespace std; const int inf=2147483647; struct Edge { int u,v,c,nx; }g[M]; int cnt=1,list[N]; int d[N],cur 阅读全文
posted @ 2018-08-05 14:55 Vagari 阅读(92) 评论(0) 推荐(0) 编辑
摘要: #include <queue> #include <memory.h> using namespace std; struct Edge { int u,v,w,nx; }g[M]; int cnt,list[N]; int d[N]; bool b[N]; void Spfa(int v0) { 阅读全文
posted @ 2018-08-05 14:44 Vagari 阅读(88) 评论(0) 推荐(0) 编辑