首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
litery
2026年2月12日 16:37
EXCEL排序 题解:
P1338
回复 0
|
赞 0
|
浏览 37
#include <bits/stdc++.h> using namespace std; struct stu{ string no; string name; int score; }; bool compare_1(stu a,stu b){ return a.no<b.no; } bool compare_2(stu a,stu b){ if(a.name==b.name) return a.no<b.no; return a.name<b.name; ...
bro
2026年2月10日 15:24
EXCEL排序 题解:c++
P1338
回复 0
|
赞 0
|
浏览 36
#include <bits/stdc++.h> using namespace std; struct Student{ string id; string name; int grade; }; bool cmp1(Student a, Student b){ return a.id < b.id; } bool cmp2(Student a, Student b){ if(a.name == b.na...
曾不会
2026年1月31日 16:00
EXCEL排序 题解:
P1338
回复 0
|
赞 0
|
浏览 68
//题目有问题,只要Case就可以啦 nom=1 while(1): try: ss = list(map(int, input().split())) n = ss[0] c = ss[1] s = [] if n==0: quit() for i in range(n): sm = list(map(str, input().split())) xuehao = sm[0] ...
zxjrheaven
2025年3月17日 23:52
EXCEL排序 题解:暴力
P1338
回复 0
|
赞 3
|
浏览 1.7k
#include <bits/stdc++.h> using namespace std; struct node { string num; string name; int score; }stu[100005]; bool cmp1(node a,node b) { return a.num<b.num; } bool cmp2(node a,node b) { ...
可可爱爱草莓派
2024年8月27日 14:46
解题思路
P1338
回复 0
|
赞 11
|
浏览 2.7k
#include<bits/stdc++.h> using namespace std; struct excel{ int p; string name; int grade; }stu[100010]; bool p_cmp(excel a,excel b){ return a.p < b.p; } bool name_cmp(excel a,excel b){ return a.name < b.n...
18237466773
2024年3月12日 21:43
EXCEL排序 题解:通过率只有75%,求大佬帮忙看一下哪里出问题了
P1338
回复 5
|
赞 11
|
浏览 1.7k
#include<bits/stdc++.h> using namespace std; struct Student{ int id; char name[5000]; int score; }; int cmp1(Student a,Student b){ return a.id<b.id; } int cmp2(Student a,Student b){ if(a.name...
yanmy
2024年3月22日 16:20
简洁
P1338
回复 0
|
赞 6
|
浏览 1.5k
#include <iostream> #include <algorithm> #include <string> #include <vector> using namespace std; struct Student { string id; string name; int score; }; bool cmp1(Student a, Student b) { return a.id < b.id; } bool cmp2(Student a, Student...
绿城
2024年1月21日 13:56
EXCEL排序 题解:
P1338
回复 2
|
赞 5
|
浏览 1.6k
结构体排序 因为数量n<=100000 所以本题使用快速排序 编程前建立一个结构体来保存学号 姓名 考试成绩,代码如下 #include<stdio.h> #include<math.h> #include<string.h> struct student { char xuehao[10]; char xingming[10]; int chengji; }score[100000];//快排...
gallopzhang
2022年8月12日 09:27
特殊的排序规则
P1338
回复 0
|
赞 4
|
浏览 6.3k
利用空格分别输入学号、姓名与成绩信息,编写比较函数实现排序规则: 1. 当C=1时,直接根据学号排序 2. 当C=2时,如果姓名相同,则根据学号排序;否则根据姓名排序 3. 当C=3时,如果成绩相同,则根据学号排序;否则根据成绩排序 #include <bits/stdc++.h> using namespace std; struct Student { char no[6]; int grade; char name[10...
杨德胜
2021年3月8日 20:07
P1338 解题思路分享
P1338
回复 0
|
赞 1
|
浏览 7.7k
#include <bits/stdc++.h> using namespace std; struct tt{ string id,name; int grade; }; bool cmp1(tt a, tt b){ a.id<b.id; } bool cmp2(tt a, tt b){ return a.name<b.name; } bool cmp3(tt a, tt b){ return a.grade<b.grade; } int main() { ...
1
2
题目
EXCEL排序
题解数量
11
发布题解
在线答疑
热门题解
1
EXCEL排序 题解:通过率只有75%,求大佬帮忙看一下哪里出问题了
2
解题思路
3
简洁
4
EXCEL排序 题解:
5
特殊的排序规则
6
EXCEL排序 题解:暴力
7
P1338 解题思路分享
8
说好的case i...i呢
9
EXCEL排序 题解:
10
EXCEL排序 题解: