上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 74 下一页

2025年11月23日

1072. Gas Station (30)

摘要: #include <iostream> #include <string.h> #include <vector> using namespace std; struct node { int next, dis; }; int n; int getindex(char s[]) { int ind 阅读全文

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

1071. Speech Patterns (25)

摘要: #include <iostream> #include <string> #include <string.h> #include <map> using namespace std; char s[1048580], cur[1048580], res[1048580]; int judge(c 阅读全文

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

1070. Mooncake (25)

摘要: #include <iostream> #include <algorithm> using namespace std; struct node { double amounts, prices, perprice; }mooncakes[1010]; int cmp(node n1, node 阅读全文

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

1069. The Black Hole of Numbers (20)

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

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

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 王景迁 阅读(10) 评论(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 王景迁 阅读(6) 评论(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 王景迁 阅读(9) 评论(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 王景迁 阅读(14) 评论(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 王景迁 阅读(19) 评论(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 王景迁 阅读(10) 评论(0) 推荐(0)

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 74 下一页

导航