上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 74 下一页

2025年11月23日

1020. Tree Traversals (25)

摘要: #include <iostream> #include <queue> using namespace std; struct node { int lchild, rchild, key; }tree[40]; int post[40], in[40], r, first = 1; queue< 阅读全文

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

1019. General Palindromic Number (20)

摘要: #include <iostream> #include <vector> using namespace std; int main() { int n, b; scanf("%d%d", &n, &b); if(n == 0) { printf("Yes\n0\n"); return 0; } 阅读全文

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

1018. Public Bike Management (30)

摘要: #include <iostream> #include <vector> using namespace std; struct node { int next, t; }; vector<node> v[510]; vector<int> path, res; int perfect, sp, 阅读全文

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

1017. Queueing at Bank (25)

摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; struct node { int arriving, processing; }; int cmp(node n1, node n2) { 阅读全文

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

1016. Phone Bills (25)

摘要: #include <iostream> #include <map> #include <string> #include <string.h> #include <vector> #include <algorithm> using namespace std; struct node { int 阅读全文

posted @ 2025-11-23 16:56 王景迁 阅读(19) 评论(0) 推荐(0)

1015. Reversible Primes (20)

摘要: #include <iostream> #include <math.h> #include <vector> using namespace std; int judge(int n) { if(n <= 1) { return 0; } int r = sqrt(n * 1.0), i; for 阅读全文

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

1014. Waiting in Line (30)

摘要: #include <iostream> #include <queue> using namespace std; int main() { int n, m, k, q; scanf("%d%d%d%d", &n, &m, &k, &q); int processing[1010], i, res 阅读全文

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

1013. Battle Over Cities (25)

摘要: #include <iostream> #include <vector> using namespace std; int tree[1010], sum[1010]; void init(int n) { int i; for(i = 1; i <= n; i++) { tree[i] = -1 阅读全文

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

1012. The Best Rank (25)

摘要: #include <iostream> #include <algorithm> using namespace std; struct node { int id, score[5]; }stu[2010]; int flag[1000000], bestrankindex[1000000], c 阅读全文

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

1011. World Cup Betting (20)

摘要: #include <iostream> using namespace std; int main() { int index[3], i, j; double max[3], cur; for(i = 0; i <= 2; i++) { for(j = 0; j <= 2; j++) { scan 阅读全文

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

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 74 下一页

导航