成绩排序-题解(Java代码) 被测试数据有多组这句话坑了一次 importjava.util.Scanner;publicclassMain{publicstaticvoidmain(String[]args){Scannerscanner=newScanner(System.in);while(scanner.hasNext()){intn=scanner.n 题解列表 2019年09月29日 0 点赞 0 评论 1489 浏览 评分:0.0
题目 1739: 成绩排序 摘要:解题思路:注意事项:参考代码:def compare_students(student): name, age, score = student return (score, name, …… 题解列表 2023年11月10日 0 点赞 0 评论 674 浏览 评分:2.0
成绩排序 (Python代码) 前提申明:我使用了两种解法但是结果都是错误50%,但没有找到问题所在,自己测试了几组特殊数据排序正确的分析:方法一:先按成绩冒泡排序,再按名字冒泡排序,再按年龄冒泡排序方法二:以成绩为排序要点,在该冒泡排序内,如果成绩相等,等判断名字,如果连名字都相等, 题解列表 2020年01月27日 0 点赞 2 评论 2526 浏览 评分:2.0
对矩阵二维数组还是不是很熟悉啊 摘要:解题思路:注意事项:折腾了这么久,不懈题解对不起自己看时间一道题也高了快一个小时了参考代码:##while True:## n=int(input())## lh=[]## for …… 题解列表 2022年05月27日 0 点赞 0 评论 590 浏览 评分:2.0
成绩排序 (C++代码) #思路实现自定义类型的比较规则即可。#代码```cpp#include#include//结构体:学生信息,包括姓名、年龄、成绩structStudent{std::stringname;intage;intscore;};//重点:实现结构体Student的比较规则intcompareStu(Stu 题解列表 2019年12月29日 0 点赞 0 评论 2707 浏览 评分:5.2
成绩排序 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> struct student{ int age; int scor…… 题解列表 2017年12月15日 2 点赞 0 评论 2421 浏览 评分:7.1
成绩排序 (C语言代码) 摘要:注意事项: 题目没说清楚。先按成绩升序排,成绩相同则按名字字母序升序排,再相同的话按年龄升序排。参考代码:#include<stdio.h> #include<string.h> #…… 题解列表 2018年09月01日 0 点赞 9 评论 2811 浏览 评分:7.3
成绩排序 (Python代码)最简方法sort(),无需思考 ```pythonwhileTrue:#测试数据有多组,因此要循环,否则就会答案错误50%students=[]N=int(input())whileN:tem=input().split()#分割输入字符name=tem[0]age=int(tem[1])score=int(tem[2])stude 题解列表 2020年02月15日 1 点赞 0 评论 1594 浏览 评分:7.6
成绩排序 (C++代码) 摘要:#include<iostream> #include<algorithm> #include<cstring> using namespace std; struct stu { ch…… 题解列表 2018年08月03日 0 点赞 2 评论 1997 浏览 评分:8.0
成绩排序-题解(C++代码) 摘要:解题思路:排序注意事项:1:均是从小到大排序2:多组输入参考代码:#include<iostream>using namespace std;#include<algorithm>#include<c…… 题解列表 2020年11月09日 0 点赞 0 评论 1473 浏览 评分:8.0