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

2025年11月23日

1048. Find Coins (25)

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

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

1047. Student List for Course (25)

摘要: #include <iostream> #include <vector> #include <string.h> #include <algorithm> using namespace std; vector<int> v[2510]; char name[270000][5]; int get 阅读全文

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

1046. Shortest Distance (20)

摘要: #include <iostream> using namespace std; int dis[100010]; void swap(int &a, int &b) { int temp = a; a = b; b = temp; } int getmin(int a, int b) { if(a 阅读全文

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

1045. Favorite Color Stripe (30)

摘要: #include <iostream> using namespace std; int fav[210], ori[10010], res[210][10010]; int getmax(int a, int b) { if(a > b) { return a; } else { return b 阅读全文

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

1044. Shopping in Mars (25)

摘要: #include <iostream> #include <vector> using namespace std; struct node { int begin, end; }; vector<long long> v; int getindex(int low, int high, long 阅读全文

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

1043. Is It a Binary Search Tree (25)

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

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

1042. Shuffling Machine (20)

摘要: #include <iostream> using namespace std; int main() { int k; scanf("%d", &k); int res[55], index[55], i; for(i = 1; i <= 54; i++) { scanf("%d", &index 阅读全文

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

1041. Be Unique (20)

摘要: #include <iostream> #include <vector> using namespace std; int flag[10010]; int main() { int n; scanf("%d", &n); int i, num; vector<int> v; for(i = 1; 阅读全文

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

1040. Longest Symmetric String (25)

摘要: #include <iostream> #include <string.h> using namespace std; int main() { char s[1010]; gets(s); int len = strlen(s), i, count, res = 0, j, k; for(i = 阅读全文

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

1039. Course List for Student (25)

摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> v[270000]; int getbigindex(char s[]) { return (s[0] - 'A') 阅读全文

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

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

导航