上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 69 下一页

2025年11月23日

1068. Find More Coins (30)

摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; int num[10010], arr[10010], n, m, flag; vector<int> path; void printpa 阅读全文

posted @ 2025-11-23 17:14 王景迁 阅读(2) 评论(0) 推荐(0)

1067. Sort with Swap(0) (25)

摘要: #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++) 阅读全文

posted @ 2025-11-23 17:14 王景迁 阅读(3) 评论(0) 推荐(0)

1066. Root of AVL Tree (25)

摘要: #include <iostream> #include <stdlib.h> using namespace std; typedef struct node { int key, bf; struct node *lchild, *rchild; }*bnode; void rrotate(bn 阅读全文

posted @ 2025-11-23 17:13 王景迁 阅读(3) 评论(0) 推荐(0)

1065. A+B and C (64bit) (20)

摘要: #include <iostream> using namespace std; int main() { int n; scanf("%d", &n); long long a, b, c, res; int i, flag; for(i = 1; i <= n; i++) { scanf("%l 阅读全文

posted @ 2025-11-23 17:13 王景迁 阅读(2) 评论(0) 推荐(0)

1064. Complete Binary Search Tree (30)

摘要: #include <iostream> #include <algorithm> #include <queue> using namespace std; struct node { int lchild, rchild, key; }tree[1010]; int num[1010], r = 阅读全文

posted @ 2025-11-23 17:12 王景迁 阅读(3) 评论(0) 推荐(0)

1063. Set Similarity (25)

摘要: #include <iostream> #include <set> using namespace std; int main() { int n; scanf("%d", &n); int i, k, j, next; set<int> s[60]; for(i = 1; i <= n; i++ 阅读全文

posted @ 2025-11-23 17:12 王景迁 阅读(3) 评论(0) 推荐(0)

1062. Talent and Virtue (25)

摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; struct node { int ID_Number, Virtue_Grade, Talent_Grade, total; }; int 阅读全文

posted @ 2025-11-23 17:12 王景迁 阅读(2) 评论(0) 推荐(0)

1061. Dating (20)

摘要: #include <iostream> #include <string.h> using namespace std; int main() { char s[4][70]; int i, len[4]; for(i = 0; i < 4; i++) { gets(s[i]); len[i] = 阅读全文

posted @ 2025-11-23 17:11 王景迁 阅读(2) 评论(0) 推荐(0)

1060. Are They Equal (25)

摘要: #include <iostream> #include <string.h> using namespace std; struct node { int d; char s[110]; }; int n; node getnode(char s[]) { int firstpos = -1, p 阅读全文

posted @ 2025-11-23 17:11 王景迁 阅读(2) 评论(0) 推荐(0)

1059. Prime Factors (25)

摘要: #include <iostream> #include <math.h> using namespace std; int judge(long int n) { long int i, r = sqrt(n * 1.0); for(i = 2; i <= r; i++) { if(n % i = 阅读全文

posted @ 2025-11-23 17:11 王景迁 阅读(2) 评论(0) 推荐(0)

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 69 下一页

导航