上一页 1 2 3 4 5 6 7 8 9 10 ··· 69 下一页

2025年11月25日

1117. Eddington Number(25)

摘要: #include <iostream> #include <algorithm> using namespace std; int num[100010]; int getindex(int low, int high, int goal) { int mid; while(low < high) 阅读全文

posted @ 2025-11-25 09:07 王景迁 阅读(4) 评论(0) 推荐(0)

1118. Birds in Forest (25)

摘要: #include <iostream> #include <vector> using namespace std; int flag[10010], sum[10010], tree[10010]; vector<int> v; void init(int id) { tree[id] = -1; 阅读全文

posted @ 2025-11-25 09:06 王景迁 阅读(4) 评论(0) 推荐(0)

1119. Pre- and Post-order Traversals (30)

摘要: #include <iostream> #include <vector> using namespace std; int pre[40], post[40], flag = 1; vector<int> v; int getindex(int a, int b, int d) { int i; 阅读全文

posted @ 2025-11-25 09:06 王景迁 阅读(3) 评论(0) 推荐(0)

1121. Damn Single (25)

摘要: #include <iostream> #include <algorithm> #include <vector> #include <string.h> using namespace std; int couple[100000], party[100000], num[100000]; in 阅读全文

posted @ 2025-11-25 09:04 王景迁 阅读(4) 评论(0) 推荐(0)

1122. Hamiltonian Cycle (25)

摘要: #include <iostream> #include <string.h> using namespace std; int path[210][210]; int main() { int n, m; scanf("%d%d", &n, &m); int i, a, b; for(i = 1; 阅读全文

posted @ 2025-11-25 09:04 王景迁 阅读(3) 评论(0) 推荐(0)

1120. Friend Numbers (20)

摘要: #include <iostream> #include <algorithm> #include <vector> #include <string.h> using namespace std; int flag[50]; int main() { int n; scanf("%d", &n); 阅读全文

posted @ 2025-11-25 09:04 王景迁 阅读(4) 评论(0) 推荐(0)

1123. Is It a Complete AVL Tree (30)

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

posted @ 2025-11-25 09:03 王景迁 阅读(3) 评论(0) 推荐(0)

2025年11月23日

1101. Quick Sort (25)

摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; int num[100010], low[100010], high[100010]; int main() { int n; scanf( 阅读全文

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

1100. Mars Numbers (20)

摘要: #include <iostream> #include <string.h> using namespace std; char ch[2][13][5] = { "tret", "jan", "feb", "mar", "apr", "may", "jun", "jly", "aug", "se 阅读全文

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

1099. Build A Binary Search Tree (30)

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

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

上一页 1 2 3 4 5 6 7 8 9 10 ··· 69 下一页

导航