首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
啦啦168
2026年3月15日 22:50
成绩排序2.0 题解:
P1159
回复 0
|
赞 1
|
浏览 30
#include<stdio.h> #include<stdlib.h> #include<algorithm> int main(){ int n; int p[100],q[100]; scanf("%d",&n); for(int i=0;i<n;i++){ scanf("%d %d",&p[i],&am...
yauqq
2026年3月15日 17:09
成绩排序2.0 题解:
P1159
回复 0
|
赞 0
|
浏览 23
#include<bits/stdc++.h> using namespace std; struct node{ int num,score; }; bool cmp(node a,node b){ if(a.score == b.score) return a.num < b.num; else return a.score < b.score; } int main(){ int n; cin >> n; vector<node> stu(n); for(int i=0...
HKX9XAS
2026年3月15日 17:05
成绩排序2.0 题解:不用vector版
P1159
回复 0
|
赞 1
|
浏览 18
#include<stdio.h> #include<iostream> #include<algorithm> #include<string> using namespace std; typedef struct{ int id; int grade; }Stu; Stu stu[100]; bool comparedec( Stu a, Stu b ){ if(a.grade==...
kkkkkkllll
2026年3月10日 17:56
成绩排序2.0 题解:
P1159
回复 0
|
赞 2
|
浏览 84
#include <iostream> #include <string> #include <algorithm> #include<ctype.h> #include<map> #include<vector> using namespace std; bool cmp(pair<int,int> a,pair<int,int> b){ if(a.second<b.second){  ...
Jinx_K
2026年3月10日 10:45
成绩排序2.0 题解:vector+sort
P1159
回复 0
|
赞 2
|
浏览 106
#include <bits/stdc++.h> using namespace std; typedef struct{ int num; int score; }stu; bool cmp(const stu &x,const stu &y) { if(x.score!=y.score) return x.score<y.score; else return x.num<y.num; } int main() { int N; cin>>N; int p,q; vec...
uly
2026年3月4日 15:44
成绩排序2.0 题解:
P1159
回复 0
|
赞 2
|
浏览 79
#include <bits/stdc++.h> using namespace std; struct student { int id; int score; }s; bool cmp(student a, student b) { if (a.score < b.score) return true; if (a.score ==b.score) { if (a.id < b.id) return true; else return false; } ...
牧濑
2026年2月10日 13:09
成绩排序2.0 题解:二元组存+sort自定义比较函数
P1159
回复 0
|
赞 5
|
浏览 181
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n; cin>>n; int id,score; vector<pair<int,int>> arr; for(int i=0;i<n;i++){ cin>>id; &...
bro
2026年2月9日 13:49
成绩排序2.0 题解:c++,采用增强for,vector
P1159
回复 0
|
赞 5
|
浏览 146
//采用增强for循环,vector #include <bits/stdc++.h> using namespace std; struct Student{ int id; int grade; }; bool cmp(Student a , Student b){ if(a.grade == b.grade) return a.id < b.id; else return a.grade < b.grade; } ...
xsw
2026年2月3日 11:39
成绩排序2.0 题解:
P1159
回复 0
|
赞 3
|
浏览 205
#include<iostream> #include<algorithm> using namespace std; struct Student { int id; int score; }s[110]; bool cmp(Student s1, Student s2) { if (s1.score != s2.score) return s1.score < s2.score; return s1.id < s2.id; } int main() { int n; cin &g...
kawhileo
2026年2月2日 10:24
成绩排序2.0 题解:c++ STL
P1159
回复 0
|
赞 4
|
浏览 257
#include<bits/stdc++.h> using namespace std; struct students{ int num,score; }; bool grade(const students&a,const students&b){ if(a.score==b.score) return a.num<b.num; return a.score<b.score; } int main() {...
1
2
3
...
5
题目
成绩排序2.0
题解数量
49
发布题解
在线答疑
热门题解
1
成绩排序2.0 题解:记录一下
2
成绩排序2.0 题解:
3
成绩排序2.0 题解:
4
成绩排序2.0 题解:暴力至高
5
成绩排序2.0 题解:
6
成绩排序2.0 题解:
7
成绩排序2.0 题解:为什么通过数据只有75%啊 球球了 帮我找出错误测试数据吧 感谢
8
成绩排序2.0 题解:改了好多次了,一直都通过不了
9
成绩排序2.0 题解:c++,采用增强for,vector
10
成绩排序2.0 题解:二元组存+sort自定义比较函数