摘要:#include <iostream> using namespace std; int dis[100010]; void swap(int &a, int &b) { int temp = a; a = b; b = temp; } int getmin(int a, int b) { if(a
阅读全文
摘要:#include <iostream> using namespace std; int fav[210], ori[10010], res[210][10010]; int getmax(int a, int b) { if(a > b) { return a; } else { return b
阅读全文
摘要:#include <iostream> #include <vector> using namespace std; struct node { int begin, end; }; vector<long long> v; int getindex(int low, int high, long
阅读全文
摘要:#include <iostream> #include <vector> using namespace std; struct node { int lchild, rchild, key; }tree[1010]; int pre[1010], r = 1, first = 1, choose
阅读全文
摘要:#include <iostream> using namespace std; int main() { int k; scanf("%d", &k); int res[55], index[55], i; for(i = 1; i <= 54; i++) { scanf("%d", &index
阅读全文
摘要:#include <iostream> #include <vector> using namespace std; int flag[10010]; int main() { int n; scanf("%d", &n); int i, num; vector<int> v; for(i = 1;
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; int main() { char s[1010]; gets(s); int len = strlen(s), i, count, res = 0, j, k; for(i =
阅读全文
摘要:#include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> v[270000]; int getbigindex(char s[]) { return (s[0] - 'A')
阅读全文
摘要:#include <iostream> #include <string.h> #include <string> #include <algorithm> #include <vector> using namespace std; int cmp(string a, string b) { st
阅读全文
摘要:#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int nc; scanf("%d", &nc); int i; vector<long long> v[4];
阅读全文
摘要:#include <iostream> using namespace std; struct node { char name[20], gender, id[20]; int grade; }; int main() { int n; scanf("%d", &n); int i, grade[
阅读全文
摘要:#include <iostream> #include <vector> #include <string.h> using namespace std; struct node { char name[20], password[20]; }; int main() { int n; scanf
阅读全文
摘要:#include <iostream> #include <vector> #include <algorithm> using namespace std; int tree[2010], sum[2010], smallindex[2010], bigindex[27000], weight[2
阅读全文
摘要:#include <iostream> #include <algorithm> using namespace std; struct node { double dis, p; }stations[510]; int cmp(node n1, node n2) { return n1.dis <
阅读全文
摘要:#include <iostream> #include <vector> using namespace std; struct node { int address, next; char data; }nod[100000]; int main() { int begin[2], n; sca
阅读全文
摘要:#include <iostream> #include <string.h> using namespace std; int main() { char s[100]; gets(s); int n1, n2, n = strlen(s), flag = 0; for(n2 = 3; n2 <=
阅读全文
摘要:#include <iostream> #include <vector> #include <string.h> using namespace std; struct node { int next, dis, cost; }; int main() { int n, m, s, d; scan
阅读全文
摘要:#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; scanf("%d", &n); int i; long int num; vector<long
阅读全文
摘要:#include <iostream> #include <algorithm> #include <string.h> using namespace std; struct node { int id, score; char name[10]; }stu[100010]; int c; int
阅读全文
摘要:#include <iostream> #include <vector> using namespace std; int main() { int num, i; vector<int> v[4]; for(i = 1; i <= 3; i++) { scanf("%d", &num); if(
阅读全文