摘要:#include <iostream> #include <stack> using namespace std; struct node { int lchild, rchild, key; }tree[40]; int pre[40], in[40], r = 1, first = 1; int
阅读全文
摘要:#include <iostream> #include <algorithm> using namespace std; long long num[100010]; int getindex(int low, int high, long long goal) { int mid; while(
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; int flag[130]; void higherchar(char &ch) { if(ch >= 'a' && ch <= 'z') { ch -= 32; } } int
阅读全文
摘要:#include <iostream> using namespace std; struct node { char name[20], id[20]; }stu[110]; int flag[110]; int main() { int n; scanf("%d", &n); int i, gr
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; int first = 1; void setfirst() { if(first == 1) { first = 0; } else { printf(" "); } } in
阅读全文
摘要:#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 <algorithm> #include <vector> using namespace std; struct node { int id, ge, gi, choice[5]; double finalgrade; }stu[40010
阅读全文
摘要:#include <iostream> #include <queue> #include <vector> using namespace std; double p, r, res, amount[100010]; queue<int> q; vector<int> v[100010]; voi
阅读全文
摘要:#include <iostream> #include <math.h> using namespace std; int flag[10010]; int judge(int n) { if(n == 1) { return 0; } int r = sqrt(n * 1.0), i; for(
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; int main() { int n; scanf("%d", &n); getchar(); char a[260]; gets(a); int alen = strlen(a
阅读全文
摘要:#include <iostream> #include <vector> #include <queue> #include <string.h> using namespace std; int l, vis[1010], level, res; vector<int> v[1010]; que
阅读全文
摘要:#include <iostream> #include <algorithm> #include <string.h> #include <vector> using namespace std; struct node { int id, score[6], fullmarknum, total
阅读全文
摘要:#include <iostream> #include <vector> using namespace std; struct node { int address, key, next; }nod[100010]; int main() { int begin, n, k; scanf("%d
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; char s[10010], former[10010]; int main() { gets(s); if(s[0] == '-') { printf("-"); } int
阅读全文
摘要:#include <iostream> #include <string.h> #include <vector> using namespace std; struct node { int next, dis; }; int n; int getindex(char s[]) { int ind
阅读全文
摘要:#include <iostream> #include <string> #include <string.h> #include <map> using namespace std; char s[1048580], cur[1048580], res[1048580]; int judge(c
阅读全文
摘要:#include <iostream> #include <algorithm> using namespace std; struct node { double amounts, prices, perprice; }mooncakes[1010]; int cmp(node n1, node
阅读全文
摘要:#include <iostream> #include <string.h> #include <algorithm> using namespace std; int cmp(char a, char b) { return a > b; } int main() { int num[2]; s
阅读全文
摘要:#include <iostream> #include <vector> #include <algorithm> using namespace std; int num[10010], arr[10010], n, m, flag; vector<int> path; void printpa
阅读全文
摘要:#include <iostream> using namespace std; int index[100010], num[100010]; int main() { int n; scanf("%d", &n); int i, count = 0; for(i = 0; i < n; i++)
阅读全文