摘要:#include <iostream> #include <vector> using namespace std; int pre[40], post[40], flag = 1; vector<int> v; int getindex(int a, int b, int d) { int i;
阅读全文
摘要:#include <iostream> #include <algorithm> #include <vector> #include <string.h> using namespace std; int couple[100000], party[100000], num[100000]; in
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; int path[210][210]; int main() { int n, m; scanf("%d%d", &n, &m); int i, a, b; for(i = 1;
阅读全文
摘要:#include <iostream> #include <algorithm> #include <vector> #include <string.h> using namespace std; int flag[50]; int main() { int n; scanf("%d", &n);
阅读全文
摘要:#include <iostream> #include <stdlib.h> #include <queue> using namespace std; typedef struct node { int key, bf; struct node *lchild, *rchild; }*bnode
阅读全文
摘要:#include <iostream> #include <vector> #include <algorithm> using namespace std; int num[100010], low[100010], high[100010]; int main() { int n; scanf(
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; char ch[2][13][5] = { "tret", "jan", "feb", "mar", "apr", "may", "jun", "jly", "aug", "se
阅读全文
摘要:#include <iostream> #include <algorithm> #include <queue> using namespace std; struct node { int lchild, rchild, key; }tree[110]; int in[110], index,
阅读全文
摘要:#include <iostream> #include <algorithm> using namespace std; int ori[110], cur[110]; void adjustdown(int k, int max) { ori[0] = ori[k]; int i; for(i
阅读全文
摘要:#include <iostream> #include <vector> using namespace std; struct node { int address, key, next; }linklist[100000]; int flag[10010]; vector<node> v[3]
阅读全文
摘要:#include <iostream> #include <vector> #include <math.h> using namespace std; int judge(int n) { int r = sqrt(n * 1.0), i; for(i = 2; i <= r; i++) { if
阅读全文
摘要:#include <iostream> #include <string> #include <string.h> #include <vector> #include <map> #include <algorithm> using namespace std; struct node { int
阅读全文
摘要:#include <iostream> #include <vector> #include <queue> using namespace std; vector<int> v[110]; queue<int> q; int vis[110], level, maxcount, maxlevel;
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; char s[100010]; int main() { gets(s); int i, len = strlen(s); long long pcount = 0, acoun
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; int aflag[130], bflag[130]; int main() { char a[1010], b[1010]; gets(a); gets(b); int len
阅读全文
摘要:#include <iostream> #include <queue> using namespace std; struct node { int x, y, z; }; queue<node> q; int flag[1300][130][70], m, n, l, vis[1300][130
阅读全文
摘要:#include <iostream> #include <vector> #include <queue> using namespace std; vector<int> v[100010]; queue<int> q; double p, r; int res; void bfs() { in
阅读全文
摘要:#include <iostream> #include <algorithm> using namespace std; int main() { int n; scanf("%d", &n); int i, ori[110], cur[110]; for(i = 1; i <= n; i++)
阅读全文
摘要:#include <iostream> using namespace std; long long getsame(long long a, long long b) { if(b != 0) { return getsame(b, a % b); } else { return a; } } v
阅读全文
摘要:#include <iostream> #include <vector> #include <string.h> using namespace std; struct node { int next, cost; }; vector<node> v[27000]; vector<int> pat
阅读全文