1083 List Grades (25 point(s))

FPGA设计-Vivado的Off-Chip Termination设置问题 经常遇到在FPGA设计时,很多人很迷惑这些关于硬件的终端匹配怎么设置,Vivado的Off-Chip Termination设置问题,这里就详细说一下这个问题。 阅读详情

1083 List Grades (25 point(s))

Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades are in a given interval.

Input Specification:

Each input file contains one test case. Each case is given in the following format:

N
name[1] ID[1] grade[1]
name[2] ID[2] grade[2]
... ...
name[N] ID[N] grade[N]
grade1 grade2

where name[i] and ID[i] are strings of no more than 10 characters with no space, grade[i] is an integer in [0, 100], grade1 and grade2 are the boundaries of the grade's interval. It is guaranteed that all the grades are distinct.

Output Specification:

For each test case you should output the student records of which the grades are in the given interval [grade1, grade2] and are in non-increasing order. Each student record occupies a line with the student's name and ID, separated by one space. If there is no student's grade in that interval, output NONE instead.

Sample Input 1:

4
Tom CS000001 59
Joe Math990112 89
Mike CS991301 100
Mary EE990830 95
60 100

Sample Output 1:

Mike CS991301
Mary EE990830
Joe Math990112

Sample Input 2:

2
Jean AA980920 60
Ann CS01 80
90 95

Sample Output 2:

NONE

简单排序题。对于没给范围的题,申请一个动态结构体数组来完成。

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
struct record {
	string name;
	string id;
	int grade;
	bool operator < (const record &other) const{
		return grade>other.grade;
	}
};

int main(void){
	int n,g1,g2;cin>>n;
	record *R=new record[n];
	for(int i=0;i<n;i++) cin>>R[i].name>>R[i].id>>R[i].grade; 
	sort(R,R+n);
	cin>>g1>>g2;
	bool flag = false;
	for(int i=0;i<n;i++){
		if(R[i].grade>=g1&&R[i].grade<=g2){
			flag = true; 
			cout<<R[i].name<<" "<<R[i].id<<endl; 
		}
	}
	if(!flag) cout<<"NONE"<<endl;
	return 0;
}

 

AI智能体丨使用Coze一键生成爆款书单视频,3个月内获赞131.1w!(附保姆级教程) 这篇教程详细介绍了如何使用扣子(Coze)平台的AI智能工作流批量制作爆款书单视频。通过自动化流程,只需1-2分钟即可生成45-50秒的书单视频,效率提升近百倍。工作流包含文案生成、音频合成、图片素材获取、视频剪辑等全流程,支持随机生成8本书单、自动提取金句、智能配音等功能。教程提供了完整的操作步骤,包括剪映草稿配置、特效添加等细节,并附体验链接和示例效果。最终生成的视频包含书单展示、金句字幕、背景音乐等元素,适合书单号运营者快速批量产出内容。 阅读详情

相关推荐

GD32F303定时器配置:实现两路互补PWM输出与相位控制

本文详细解析了基于GD32F303定时器实现两路互补PWM输出与精确相位控制的方法。通过配置TIMER2的中间对齐模式,结合REMAP功能解决引脚复用问题,从硬件层面稳定生成相位差180度的互补PWM信号,适用于电机驱动、开关电源等对时序要求苛刻的应用场景。

weixin_29182481的博客 307

1083 List Grades(25 分)(C++)

Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades ...

qq_41562704的博客 260

如何把ORCAD 中的修改同步到PADS 中

Generate ECO file(*.eco),eco 文件的默然保存地址是在pads 的。ECO Files (*.eco),接着在文件中找到所生成的eco 文件,找到。再下来是产生eco 文件,先打开old_design.pcb,然后选择。PCB Design 前面的选项选中,意思把当前文件做为原始的比对。安装目录下(可修改eco 文件的保存目录),这里把eco 文件保存。接下来用新生成asc 文件的文件产生新的PCB 文件,新生成。不对新生成的pcb 做任何的修改,直接保存文件,这里把新文件。

智光工作室 993

1083 List Grades (25point(s)) - C语言 PAT 甲级

直接排序,输出,学生成绩各不相同

有三只土豆 167

IBM System x3650 M5 IMM配置

1、IMM基本介绍 IMM,全称是Intel Mobile Module是IBM服务器上的集成管理模块,该模块是独立于服务器系统,可以通过一个单独的IP地址,使用Web和虚拟端口方式直接启动、停止和管理远程服务器,即使主板、处理器或者内存故障导致主机无法启动,也依然可以远程管理服务器,可以远程直接操作启动画面和服务器工作界面。 2、IP地址配置 2.1 通过Web方式修改IP地址 IBM服...

血饮渊虹的博客 4万+

Qt+OpenGL+Cesium三件套:打造高性能3D GIS界面的5个关键技巧

本文深入探讨了如何利用Qt、OpenGL与Cesium三件套打造高性能3D GIS界面的5个核心技巧。内容涵盖多线程渲染架构设计、OpenGL状态管理与批处理优化、内存与显存高效管理、Qt UI与3D场景深度集成,以及跨平台部署与性能调优实战,旨在帮助开发者解决海量3D Tiles数据渲染的性能瓶颈,实现流畅的交互体验。

t8u9v0的博客 551

PAT_甲级_1083 List Grades (25point(s)) (C++)【签到题/最简单的结构体排序——没有之一】

目录 1,题目描述 题目描述 2,思路 3,AC代码 4,解题过程 1,题目描述 interval:间隔,区间,间歇; (戏剧、电影或音乐会的) 幕间休息,休息时间; Sample Input 1: 4 Tom CS000001 59 Joe Math990112 89 Mike CS991301 100 Mary EE990830 95 60 100 Samp...

&再见萤火虫&的博客 188

华为OD机试 - 文件存储系统的排序 - 深度优先搜索dfs(Java 双机位C卷 200分)

华为OD机试 双机位C卷题库疯狂收录中,刷题。

学Java,找哪吒 719

1083 List Grades (25point(s))

1083 List Grades (25point(s)) Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades are in a given interval. I

佳迪斯的博客 184

Allegro因为精度问题导致走线连接不上的解决办法

在用Allegro做PCB设计的时候,尤其是从其它单板上导数据过来的时候,有时会因为精度不一致导致连接不上,如下图。一般来说,可以逐个重新连接一下,但是如果连接点位比较多的话,需要花费较多时间。下面介绍如何使用Allegro自带的功能解决这个问题,具体操作如下。和Convert Figure Stackups to vias。因为精度问题导致走线连接不上的解决办法。线和过孔因为精度有微小的连接偏差。

weixin_54787054的博客 2613

液滴碰撞壁面的过程背景论文——bouncing反弹,spreading扩展,splashing飞溅。铺展过程介绍。还存在很多未解之谜。

【1993-德国-Phenomena of liquid drop impact on solid and liquid surfaces】液滴碰撞壁面的过程背景——bouncing反弹,spreading扩展,splashing飞溅。还存在很多未解之谜。还存在很多未解之谜。不同液滴形状碰撞过程。

qq_15963745的博客 200

1083 List Grades (25 point(s))

题解 STL简单应用。 #include&lt;iostream&gt; #include&lt;cstdio&gt; #include&lt;vector&gt; #include&lt;algorithm&gt; using namespace std; struct node { string name, id; int grade; bool operator &lt; (...

徐伯莱 242

第 10 篇:深度学习的“军火库”——CNN、RNN与Transformer,AI如何看懂世界?

深度学习的革命,不是依赖单一的通用大脑,而是为不同任务打造了专属“军火库”:CNN用“局部感知”看懂图像,RNN用“循环记忆”理解序列,而Transformer则用“全局注意力”开启了AIGC时代。理解这些架构,不是记忆孤立的技术,而是洞察AI从“专才”走向“通才”的进化脉络。

maqh_csdn的博客 786

PTA甲级1083 List Grades (25point(s))

首先,先贴柳神的博客 https://www.liuchuo.net/ 这是地址 想要刷好PTA,强烈推荐柳神的博客,和算法笔记 题目原文 Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-i...

Huangpengyu123的博客 204

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

PAT甲级1083 List Grades (25point(s))

Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades ...

Seqlist_base的博客 226

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

PAT(甲级)1083 List Grades (25point(s))

题目 题目链接 思路 题目大意:把分数从高到低排一下,依次遍历每一个分数,如果分数在给定区间内,输出; 代码 #include <iostream> #include <string> #include <cstring> #include <vector> #include <algorithm> using namespace std; const int maxn = 50; struct node{ char name[11],

hjyp的博客 163

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

pat 甲级 1083 List Grades (25 point(s))

题意:第一行n个学生,后面就输入n的学生的名字和学号,最后两个数字是成绩筛选的范围,输出符合成绩范围的学生的名字和id(根据成绩从大到小排列) 思路:把信息输入到n个结构体里面,然后把再成绩范围内的人放到vector里面,bool cmp排列,如果vector是空的说明找不到,就输出NONE。 注意点:如果struct结构体里面有string这种结构体的话,就不能简单的赋值,如push_back或者等号。 代码: #include<iostream> #include<vecto

m0_51711089的博客 183

1083 List Grades (25 分| 排序,附详细注释,逻辑分析)

写在前面 实现思路 结构体封装学生元数据信息 非递增排序 循环,区间合法打印输出 题目较为简单,10分钟内a题 测试用例 input: 4 Tom CS000001 59 Joe Math990112 89 Mike CS991301 100 Mary EE990830 95 60 100 output: Mike CS991301 Mary EE990830 Joe Math9901...

kngines 430

1083 List Grades

1083 List Grades解题代码测试结果问题整理 解题代码 #include<cstdio> #include<algorithm> using namespace std; struct student { char name[11], id[11]; int score; }s[100000]; typedef struct student stu; bool cmp(stu a, stu b) { return a.score > b.score; } in

Aruasg的博客 157

1083. List Grades (25)

题目链接:http://www.patest.cn/contests/pat-a-practise/1083 题目: Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increa

Apie_CZX的专栏 8316

1083 List Grades (25分)

Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades ...

DayDream_x的博客 236

1083 List Grades (25 分)

1083 List Grades (25 分) Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student reco...

92377 191

1083 List Grades (25 分)

Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades ...

SourDumplings的博客 242

PAT甲级 1083 List Grades

A1083. PAT List Grades (25) Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades are in a given interval. Inp

karyass的博客 222

1083 List Grades java

Given a list ofNstudent records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades ...

有梦的博客 270
上一篇: 1087 All Roads Lead to Rome (30 point(s))
下一篇: 1077 Kuchiguse (20 point(s))
coderwait
博客等级 码龄9年 20粉丝 210原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值