NWU_ACM

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 2 3 4 5 6 7 ··· 10 下一页

2017年5月3日

摘要: 拓扑排序: 对一个有向无环图(Directed Acyclic Graph简称DAG)G进行拓扑排序,是将G中所有顶点排成一个线性序列,使得图中任意一对顶点u和v,若<u,v> ∈E(G),则u在线性序列中出现在v之前。 通常,这样的线性序列称为满足拓扑次序(Topological Order)的序 阅读全文
posted @ 2017-05-03 18:06 NWU_ACM 阅读(103) 评论(0) 推荐(0) 编辑

2017年5月1日

摘要: 1 #include<bits/stdc++.h> 2 #include <cstdio> 3 #include <iostream> 4 #include <cstring> 5 #include <vector> 6 #define _xx ios_base::sync_with_stdio(0 阅读全文
posted @ 2017-05-01 19:20 NWU_ACM 阅读(98) 评论(0) 推荐(0) 编辑

2017年4月29日

摘要: #include using namespace std; int D, N; int main() { while (scanf("%d%d", &D, &N)!=EOF) { int k = 1; for (int i = 0; i < D - 1; i++) { if (N % 2) { ... 阅读全文
posted @ 2017-04-29 21:23 NWU_ACM 阅读(141) 评论(0) 推荐(0) 编辑

摘要: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define FF(i, a, b) for(int i=a; i=b; i--) #define REP(i, n) for... 阅读全文
posted @ 2017-04-29 20:18 NWU_ACM 阅读(101) 评论(0) 推荐(0) 编辑

2017年4月28日

摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 int rec[60]; 5 6 int main() 7 { 8 int a, b, n; 9 rec[0] = rec[1] = rec[2] = 1; 10 while( scanf( " 阅读全文
posted @ 2017-04-28 19:34 NWU_ACM 阅读(75) 评论(0) 推荐(0) 编辑

2017年4月26日

摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 6 //01背包二维正写写法 7 int p[107],w[107],dp[107][1007]; 8 int main() 9 阅读全文
posted @ 2017-04-26 20:28 NWU_ACM 阅读(178) 评论(0) 推荐(0) 编辑

2017年4月25日

摘要: RMQ: 1 #include <bits/stdc++.h> 2 #define rep(i,a,b) for(int i = a;i <= b;++ i) 3 #define per(i,a,b) for(int i = a;i >= b;-- i) 4 #define mem(a,b) mem 阅读全文
posted @ 2017-04-25 20:38 NWU_ACM 阅读(103) 评论(0) 推荐(0) 编辑

2017年4月23日

摘要: 1 #include <bits/stdc++.h> 2 #define _xx ios_base::sync_with_sdtio(0);cin.tie(0); 3 #define INFS 0x3fffffff 4 #define INFB 0x3fffffffffffffff 5 #defin 阅读全文
posted @ 2017-04-23 22:17 NWU_ACM 阅读(142) 评论(0) 推荐(0) 编辑

2017年4月21日

摘要: #include #include #include #include #include #include #include using namespace std; int extend_gcd(int a, int b, int &x, int &y) { if (b == 0) { x = 1, y = 0; return a; ... 阅读全文
posted @ 2017-04-21 23:22 NWU_ACM 阅读(132) 评论(0) 推荐(0) 编辑

摘要: #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #define LL long long #define lp(s,i,n) for(int i = s;i >a) { ... 阅读全文
posted @ 2017-04-21 16:55 NWU_ACM 阅读(115) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 10 下一页