首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
zsan
2024年3月23日 19:24
成绩排序2.0 题解:改了好多次了,一直都通过不了
P1159
回复 1
|
赞 5
|
浏览 1.2k
#include<bits/stdc++.h> using namespace std; struct grade{ int num; int score; }g[105]; bool comp(grade l,grade r){ return l.score<r.score; } bool comp1(grade l,grade r){ return l.num<r.num; } int main() { &nb...
honevid
2024年3月18日 00:24
成绩排序2.0 题解:
P1159
回复 0
|
赞 0
|
浏览 792
#include <cstdio> #include <map> #include <string> #include <string.h> #include <cmath> #include <vector> #include <algorithm> #include <stack> #include <queue> #include <set> #include <limits.h> using namespace std; ...
小酒
2024年3月17日 20:41
成绩排序2.0 题解:
P1159
回复 0
|
赞 0
|
浏览 1.0k
1159解题思路:使用stable_sort()和结构体实现排序;先对学号排序,后对成绩排序; #include <bits/stdc++.h> using namespace std; struct Student{ int num; double pride; }stu[105]; bool array_DSC(Student a,Student b) { return a.pride<b.pride; } bool a_ASC(Student a,Student b) { return a...
lingdongyang
2024年3月16日 11:03
成绩排序2.0 题解:
P1159
回复 0
|
赞 5
|
浏览 1.1k
#include<stdio.h> #include<stdlib.h> #include<string.h> struct Node { int id;//学号 int score;//成绩 }; int main() { int n; scanf("%d", &n); struct Node p[105];//初始化数组 for (int i = 0; i < n; i++) { scanf("%d %d", &p[i].id, &p[i].score); } /...
easymoney
2024年3月14日 14:08
成绩排序2.0 题解:
P1159
回复 0
|
赞 0
|
浏览 803
#include <stdio.h> #include <algorithm> #include <iostream> using namespace std; struct student { int num; int grade; }stu [1000]; bool asc(student a,student b){ if (a.grade == b.grade) &...
我爱陈少熙
2024年3月12日 17:21
成绩排序2.0 题解:c语言的qsort实现
P1159
回复 0
|
赞 1
|
浏览 776
#include<stdio.h> #include<stdlib.h> #include<string.h> struct stu { int num; int score; }s[]; int cmp(const void*a,const void*b) { struct stu *c=(struct stu*)a; struct stu *d=(struct stu*)b; if(c-...
FIVEszc
2024年3月10日 10:50
成绩排序2.0 题解:C++
P1159
回复 0
|
赞 0
|
浏览 890
#include <bits/stdc++.h> using namespace std; typedef struct student { int num; int grade; }; bool comp (student lhs,student rhs) { if(lhs.grade<rhs.grade) return true; else if(lhs.grade==rhs.grade && lhs.num<rhs.num) return true; ...
starry sky
2024年3月9日 21:38
成绩排序2.0 题解:
P1159
回复 0
|
赞 0
|
浏览 747
#include<iostream> #include<set> using namespace std; struct compare { bool operator()(const pair<int, int>& a, const pair<int, int>& b)const { if (a.second == b.second) &n...
A001
2024年3月8日 15:37
成绩排序2.0 题解:为什么通过数据只有75%啊 球球了 帮我找出错误
P1159
回复 2
|
赞 5
|
浏览 1.6k
#include<stdio.h> #include<string.h> #include<stdlib.h> int m,n; int main(){ int x; scanf("%d",&x); int a[110];int b[110]; for(int i=0;i<x;i++) scanf("%d %d",&a[i],&b[i]); for(...
williams
2024年3月7日 14:24
成绩排序2.0 题解:c
P1159
回复 8
|
赞 0
|
浏览 1.2k
#include <stdio.h> #include <stdbool.h> #include <math.h> #include <string.h> //object:按照成绩升序排列,成绩相同则按照学号升序排列 struct student{ int number,score; }data[1000],temp; int main(void){ int n,j,u; while(scanf("%d",&n)!=EOF){ for(int i=0;i<...
1
2
3
4
题目
成绩排序2.0
题解数量
36
发布题解
在线答疑
热门题解
1
成绩排序2.0 题解:记录一下
2
成绩排序2.0 题解:
3
成绩排序2.0 题解:暴力至高
4
成绩排序2.0 题解:
5
成绩排序2.0 题解:为什么通过数据只有75%啊 球球了 帮我找出错误测试数据吧 感谢
6
成绩排序2.0 题解:改了好多次了,一直都通过不了
7
成绩排序2.0 题解:
8
成绩排序2.0 题解:
9
成绩排序2.0 (C++)题解:
10
成绩排序2.0 题解: