摘要:#include <iostream> using namespace std; int num[1010]; void adjustup(int k) { num[0] = num[k]; int i = k / 2; while(i > 0 && num[0] < num[i]) { num[k
阅读全文
摘要:#include <iostream> using namespace std; struct node { int lchild, rchild, key; }tree1[10], tree2[10]; int index = -1; void initnode(node tree[], int
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; struct node { int lchild, rchild; char key; }tree1[10], tree2[10]; int flag[10]; int geti
阅读全文
摘要:#include <iostream> #include <queue> using namespace std; struct node { int lchild, rchild, key; }tree[10]; queue<int> q; int flag, first = 1, bfscoun
阅读全文
摘要:#include "stdafx.h" #include <iostream> #include <algorithm> #include <queue> #include <string.h> using namespace std; vector<int> path, res; int k, p
阅读全文
摘要:#include <iostream> using namespace std; double num[100010]; int main() { int n; scanf("%d", &n); int i; for(i = 1; i <= n; i++) { scanf("%lf", &num[i
阅读全文
摘要:#include <iostream> #include <algorithm> #include <algorithm> using namespace std; int num[10010], arr[110][110]; int cmp(int a, int b) { return a > b
阅读全文
摘要:#include <iostream> #include <vector> #include <queue> using namespace std; double p, r; vector<int> v[100010]; queue<int> q; int flag, bfscount; void
阅读全文
摘要:#include <iostream> #include <vector> #include <algorithm> using namespace std; int tree[1010], sum[1010]; vector<int> v[1010]; int cmp(int a, int b)
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; int main() { int n; scanf("%d", &n); int i, len, xiaoshu, j, begin, pointcount, flag, num
阅读全文
摘要:#include <iostream> #include <string.h> #include <algorithm> using namespace std; struct node { int height; char name[10]; }people[10010]; char res[10
阅读全文
摘要:#include <iostream> #include <queue> #include <string.h> using namespace std; struct node { int lchild, rchild; }tree[30]; queue<int> q; int res = 1,
阅读全文
摘要:#include <iostream> #include <vector> #include <string.h> using namespace std; struct node { int next, length, time; }; void print(vector<int> v) { in
阅读全文
摘要:#include <iostream> #include <string.h> #include <vector> using namespace std; int flag[130]; void print(vector<char> v) { int i, size = v.size(); for
阅读全文
摘要:#include <iostream> #include <algorithm> using namespace std; int num[100010]; int main() { int n; scanf("%d", &n); int i, sum = 0; for(i = 1; i <= n;
阅读全文
摘要:#include <iostream> #include <vector> #include <algorithm> #include <string.h> using namespace std; int tree[10000], sum[10000], flag[10000], estate[1
阅读全文
摘要:#include <iostream> #include <queue> using namespace std; struct node { int lchild, rchild, key; }tree[1010]; int index = -1, n1, n2; queue<int> q; vo
阅读全文
摘要:#include <iostream> #include <math.h> using namespace std; int finalrank[10000]; int judge(int n) { int i, r = sqrt(n * 1.0); for(i = 2; i <= r; i++)
阅读全文
摘要:#include <iostream> #include <algorithm> using namespace std; int num[100010]; int getindex(int low, int high, int goal) { int mid; while(low < high)
阅读全文
摘要:#include <iostream> #include <vector> using namespace std; int flag[10010], sum[10010], tree[10010]; vector<int> v; void init(int id) { tree[id] = -1;
阅读全文