随笔分类 -  排序

摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 30; string a[N]; bool cmp(const string &a, const string &b) { //自定义排序函数,这一步非常巧妙,假设a= 阅读全文
posted @ 2021-11-23 14:54 糖豆爸爸 阅读(79) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 110; struct Student { string Name; int year, month, day, num; } a[N]; bool cmp(const 阅读全文
posted @ 2021-11-23 14:53 糖豆爸爸 阅读(45) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 50010; struct Point { int x, y, z; } a[N]; bool cmp(const Point &a, const Point &b) 阅读全文
posted @ 2021-11-23 14:52 糖豆爸爸 阅读(45) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 5010; struct Person { int k; int s; } a[N]; bool cmp(const Person &a, const Person & 阅读全文
posted @ 2021-11-23 14:51 糖豆爸爸 阅读(464) 评论(0) 推荐(0) 编辑
摘要:题目传送门 一、原始方法 #include<bits/stdc++.h> using namespace std; const int N = 1010; int a[N], c[N]; int main() { int n; scanf("%d", &n); for (int i = 1; i < 阅读全文
posted @ 2021-11-23 14:50 糖豆爸爸 阅读(195) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 10010; int a[N]; int n, cnt; int main() { cin >> n; for (int i = 1; i <= n; i++) cin 阅读全文
posted @ 2021-11-23 14:48 糖豆爸爸 阅读(81) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 20010; int a[N]; int main() { int n, b; cin >> n >> b;//b是书架的高度 for (int i = 1; i <= 阅读全文
posted @ 2021-11-23 14:46 糖豆爸爸 阅读(49) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; int n; const int N = 30; struct Node { string x; int num; } a[N]; bool cmp(const Node &A, const No 阅读全文
posted @ 2021-11-23 14:36 糖豆爸爸 阅读(99) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 310; int n; struct Student { int id, chinese, total; } a[N]; bool cmp(const Student 阅读全文
posted @ 2021-11-23 14:32 糖豆爸爸 阅读(113) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include<bits/stdc++.h> using namespace std; const int N = 110; int a[N]; int main() { int n; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; 阅读全文
posted @ 2021-11-23 14:31 糖豆爸爸 阅读(50) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include<bits/stdc++.h> using namespace std; const int N = 5000010; int a[N]; void quick_sort(int q[], int l, int r, int k) { if (l >= r)return; 阅读全文
posted @ 2021-11-23 13:51 糖豆爸爸 阅读(42) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include<bits/stdc++.h> using namespace std; const int N = 100010; int a[N]; void quick_sort(int q[], int l, int r) { if (l >= r) return; int i 阅读全文
posted @ 2021-11-23 13:47 糖豆爸爸 阅读(37) 评论(0) 推荐(0) 编辑
摘要:题目传送门 //P1271.cpp #include <bits/stdc++.h> using namespace std; const int N = 1010; int a[N]; int n, m, tmp; int main() { cin >> n >> m; for (int i = 阅读全文
posted @ 2021-11-23 13:46 糖豆爸爸 阅读(79) 评论(0) 推荐(0) 编辑

Live2D
点击右上角即可分享
微信分享提示