随笔分类 -  刷题

上一页 1 ··· 3 4 5 6 7 8 下一页

1026. Table Tennis (30)
摘要:#include <iostream> #include <vector> #include <algorithm> using namespace std; struct node { int arriving, playing, hour, minute, second; }; int tabl 阅读全文

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

1025. PAT Ranking (25)
摘要:#include <iostream> #include <vector> #include <algorithm> using namespace std; struct node { long long registration_number; int score, location_numbe 阅读全文

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

1024. Palindromic Number (25)
摘要:#include <iostream> #include <string.h> using namespace std; int judge(char s[]) { int len = strlen(s), i, r = len / 2 - 1; for(i = 0; i <= r; i++) { 阅读全文

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

1023. Have Fun with Numbers (20)
摘要:#include <iostream> #include <string.h> using namespace std; int charcount[2][10]; char s[2][30]; void setstringcount(int index) { int len = strlen(s[ 阅读全文

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

1022. Digital Library (30)
摘要:#include <iostream> #include <string> #include <string.h> #include <map> #include <vector> #include <algorithm> using namespace std; int main() { int 阅读全文

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

1021. Deepest Root (25)
摘要:#include <iostream> #include <queue> #include <vector> #include <string.h> using namespace std; int vis[10010], sum[10010], tree[10010], level; queue< 阅读全文

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

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 王景迁 阅读(3) 评论(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 王景迁 阅读(3) 评论(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 王景迁 阅读(2) 评论(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 王景迁 阅读(3) 评论(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 王景迁 阅读(7) 评论(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 王景迁 阅读(3) 评论(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 王景迁 阅读(4) 评论(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 王景迁 阅读(6) 评论(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 王景迁 阅读(2) 评论(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 王景迁 阅读(4) 评论(0) 推荐(0)

1010. Radix (25)
摘要:#include "stdafx.h" #include <iostream> #include <string.h> using namespace std; long long getnumbychar(char c) { long long num; if(c >= '0' && c <= ' 阅读全文

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

1009. Product of Polynomials (25)
摘要:#include "stdafx.h" #include <iostream> #include <map> using namespace std; int main() { int n1; scanf("%d", &n1); int i, a; double b; map<int, double 阅读全文

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

1008. Elevator (20)
摘要:#include "stdafx.h" #include <iostream> using namespace std; int main() { int n; scanf("%d", &n); int former = 0, i, res = n * 5, cur; for(i = 1; i <= 阅读全文

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

1007. Maximum Subsequence Sum (25)
摘要:#include "stdafx.h" #include <iostream> using namespace std; int num[10010]; int main() { int n; scanf("%d", &n); int i, flag = 0; for(i = 1; i <= n; 阅读全文

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

上一页 1 ··· 3 4 5 6 7 8 下一页

导航