排序
123~mutouren
这个作者很懒,什么都没留下…
展开
-
hdu 2093考试排名
#include<bits/stdc++.h> using namespace std; struct Stu{ char n[15]; int q, t;}s[10001]; int main(){ int Q, T, cnt = 0, t, err; char tmp[100]; scanf("%d %d", &Q, &T); while(scanf("%s", s[cnt+1].n) == 1){//输入结束的标志 cnt++; for(转载 2021-05-05 21:00:07 · 46 阅读 · 0 评论 -
hdu 1872 稳定排序
#include<bits/stdc++.h> using namespace std; struct Stu{ char n[55]; int g;}s[305]; int main(){ int n, vis; while(scanf("%d", &n) == 1){ for(int i = 1; i <= n; i++) scanf("%s %d", &s[i].n, &s[i].g); stable_sort(s+1原创 2021-05-05 20:03:10 · 60 阅读 · 0 评论 -
结构体排序 1236
#include <bits/stdc++.h> using namespace std; #define MXN 1010 struct sStudent{ char n[25]; int g = 0;} s[MXN]; int main(){ int cnt, N, M, m, G, g, ms[15]; while(scanf("%d", &N), N){ scanf("%d %d", &M, &G); for转载 2021-04-25 19:36:05 · 69 阅读 · 0 评论