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

2025年11月23日

1058. A+B in Hogwarts (20)

摘要: #include <iostream> using namespace std; int main() { int a[3], b[3]; scanf("%d.%d.%d %d.%d.%d", &a[0], &a[1], &a[2], &b[0], &b[1], &b[2]); int add; a 阅读全文

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

1057. Stack (30)

摘要: #include <iostream> #include <stack> using namespace std; int c[100010]; int lowbit(int x) { return x & (-x); } int getsum(int x) { int sum = 0; while 阅读全文

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

1056. Mice and Rice (25)

摘要: #include <iostream> #include <vector> using namespace std; int main() { int np, ng; scanf("%d%d", &np, &ng); int weight[1010], i; for(i = 0; i < np; i 阅读全文

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

1055. The World's Richest (25)

摘要: #include <iostream> #include <string.h> #include <vector> #include <algorithm> using namespace std; struct node { char name[10]; int age, worth; }; in 阅读全文

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

1054. The Dominant Color (20)

摘要: #include <iostream> using namespace std; int c[100000000]; int main() { int m, n; scanf("%d%d", &m, &n); int i, j, num, max = 0, res; for(i = 0; i < n 阅读全文

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

1053. Path of Equal Weight (30)

摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; int s, w[110], vis[110]; vector<int> v[110], path; void printpath() { 阅读全文

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

1052. Linked List Sorting (25)

摘要: #include <iostream> #include <algorithm> #include <vector> using namespace std; struct node { int address, key, next; }nod[100000]; int cmp(node n1, n 阅读全文

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

1051. Pop Sequence (25)

摘要: #include <iostream> #include <stack> using namespace std; int main() { int m, n, k; scanf("%d%d%d", &m, &n, &k); int i, num[1010], j, index, flag, beg 阅读全文

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

1049. Counting Ones (30)

摘要: #include <iostream> using namespace std; int main() { int n; scanf("%d", &n); int low, mid, high, d = 1, res = 0; while(n >= d) { high = n / (d * 10); 阅读全文

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

1050. String Subtraction (20)

摘要: #include <iostream> #include <string.h> using namespace std; int flag[130]; char s[2][10010]; int main() { int i, len[2]; for(i = 0; i <= 1; i++) { ge 阅读全文

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

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

导航