浙江大学PAT_甲级_1083. List Grades (25)

微信小程序 - error_msg:net::ERR_CONNECTION_RESET“(“errno“:600001,“errMsg“:“uploadFile:fail errcode:-101) "errno":600001,"errMsg":"uploadFile:fail errcode:-101 cronet_error_code:-101 error_msg:net::ERR_CONNECTION_RESET"微信小程序,微信小程序wx.uploadFile报错,uniapp微信小程序uni.uploadFile上传文件报错,微信小程序调用wx.uploadFile返回错误ERR_CONNECTION_RESET,如何解决这个问题,上传图片出现报错,小程序上传视频报错,上传文件出现报错,如何 阅读详情

题目链接:点击打开链接

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
我的C++代码:

#include<iostream>
#include<algorithm>
#include<string>
#include<array>
using namespace std;
int main()
{
	int i = 0, n = 0;//n学生人数
	int grade=0,mingrade = 0, maxgrade = 0;//mingrade最低分数线,maxgrade最高分数
	string name, ID;
	array<string,101> NameAndID;//数组以分数为下标用来存储姓名和ID
	NameAndID.fill("#");//姓名和ID全部设置为"#"
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >>name >> ID >> grade;
		NameAndID[grade] = name + ' ' + ID;
	}
	cin >> mingrade >> maxgrade;
	for (i =maxgrade; i >=mingrade; i--)//从最高分到最低分输出姓名和ID
	{
		if (NameAndID[i] != "#")
		{
			cout << NameAndID[i] << endl;
			n = -1;
		}
	}
	if (n!=-1)//没有符合条件的人
	{
		cout << "NONE";
	}
	//system("pause");
	return 0;
}


【WRFDA教程】客观分析(OBSGRID)详解 客观分析(OBSGRID)详解 阅读详情

相关推荐

PlutoSDR驱动安装避坑指南:从设备管理器异常到MATLAB 2023b完美识别

本文是一份详细的PlutoSDR驱动安装与MATLAB 2023b集成排错指南。针对Windows系统下常见的设备管理器异常、驱动兼容性问题,提供了从旧驱动清理、手动指定驱动文件到USB连接稳定性排查的完整解决方案。重点阐述了如何通过离线安装硬件支持包,并利用MATLAB命令进行连接测试与射频信号验证,最终实现设备的完美识别与稳定调用。

weixin_29159441的博客 435

C++解PTAA1083 List Gr

如果每道题目都像这道题目那么简单就好了,越写越有感觉,这道题唯一难点在于输出None,那N就在cnt里数,如果没有数到那就输出0;

执念斩长河 834

手把手教你用芯驰X9HP驱动MAX96755/MAX96752点亮智能座舱仪表屏(附完整寄存器配置表)

本文详细介绍了如何使用芯驰X9HP驱动MAX96755/MAX96752实现智能座舱仪表屏的完整开发流程,包括硬件架构解析、关键寄存器配置、Linux BSP集成及调试技巧。通过实战指南和完整寄存器配置表,帮助开发者快速掌握驱动开发核心技术,提升智能座舱系统的显示性能与稳定性。

weixin_30879169的博客 541

Pat(Advanced Level)Practice--1083(List Grades)

Pat1083代码 题目描述:

奋起的Coder。。。 811

Jetson Nano 【1】入手开箱、烧系统

类似于半开箱哈哈 怀着小期待的心情,屁颠屁颠跑到村口领快递,拿到了这个香喷喷的Jetson Nano 开发板 开箱: 由于太激动了忘记拍点啥,于是在最后留了张全家福 板子的结构: 我觉得这个有必要记录一下,于是去官方文档拿了张图来:官方文档传送 1=SD card 的卡槽,位于第二层板子的背部,也就是大风扇屁股位置 2=40针扩展接头(还没开用) 3=USB的供电口,根据大佬测试(某哩...

椰子奶糖的博客 4208

【教程】BM1684X-32边缘计算盒子 网络配置教程

BM1684X边缘计算盒子网络配置教程

ShiMetaPi的博客 732

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的博客 261

DSP28335做FFT傅里叶变换

1. 看了一下例程,居然没有FFT的例程,难道这个DSP28335不能做FFT吗?对了C2000系列是有C2000 ware这个库的。方便很多,不过目前不确定在C5000上运行的FFT能直接迁移到DSP28335上行不?测试了一下,是可以的,因为都是用的math.h,下面的一些正弦函数基本一样的 2. 硬件简介,其中DSP28335和TLV320AIC23B之间使用I2C接口进行寄存器配置,...

weixin_30390075的博客 3339

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 a

accbbbxx的博客 394

谈谈人大金仓数据库

人大金仓数据库(Kingbase)是国产自主研发的关系型数据库管理系统,兼容主流数据库语法,支持高并发、高安全性及国产化适配。该数据库提供完整的安装部署方案,包括环境准备、初始化配置和验证流程,并配备专业的数据迁移工具(KDMS)实现从Oracle/MySQL等数据库的平滑迁移。系统提供KStudio等图形化管理工具,支持性能监控、备份恢复等运维功能,同时具备性能调优、高可用架构、分区表管理等高级特性,满足政府、金融等领域的企业级需求。

蜚鸣的博客 2125

物联网设备数据是如何流转的:基于EMQX与TDengine的前后端分离项目实践

背景 在我写了TDengine极简实战:从采集到入库,从前端到后端,体验物联网设备数据流转这篇文章后,不少读者朋友评论、私信说可不可以提供代码参考学习下,那必须是可以的。那篇文章主要介绍了数据采集、数据传输、数据转发、数据解析、数据存储、数据查询、数据呈现、数据导出、消息推送的物联网设备数据流程过程,作为体验 TDengine 的极简实战项目,没引入过多的业务设计(复杂功能)以及异步解耦设计(消息中间件)。 在整理代码的过程中,我发现虽然整个项目并不复杂,但是涉及到的技术点较多,有必要对关键的组件进行说明

Heartsuit的博客 9421

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 ...

ysq96的博客 239

基于STM32L4XX、HAL库的ESP32-S3-WROOM-1-N4 WIFI模块驱动程序设计

/ 检查是否收到完整的一行(以\r\n结尾)// 例如: 解析AT命令响应或MQTT消息等。// UART2初始化已在CubeMX中配置。// USART2初始化函数(由CubeMX生成)// 缓冲区溢出,重置。// 如果需要等待响应。// 处理接收到的数据。// 处理接收到的数据。// 等待ESP32模块启动。// 主循环其他任务。// 启用UART全局中断。// 发送HTTP GET请求。// 发送AT测试命令。// 连接Wi-Fi。// UART中断回调函数。

zhusl6688的博客 305

PAT甲级 1083 List Grades

浙江大学PAT题目解答内容. Contribute to ZouJiu1/PAT development by creating an account on GitHub.GitHub - ZouJiu1/PAT: 浙江大学PAT题目解答内容。

邹九的个人博客 130

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

【PAT甲级A1083】List Grades (25分)(c++)

1083 List Grades (25分) 作者:CHEN, Yue 单位:浙江大学 代码长度限制:16 KB 时间限制:400 ms 内存限制:64 MB 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 rec

小庄同学的博客 154

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

PAT (Advanced Level) Practice A1083 List Grades (25 分)(C++)(甲级)

1083 List Grades (25 分)题目AC代码 题目 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 stu...

izhxxx的博客 213

VB摄像头监控

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

【PAT】A1083. List Grades (25)

Author: CHEN, Yue Organization: 浙江大学 Time Limit: 400 ms Memory Limit: 64 MB Code Size Limit: 16 KB A1083. List Grades (25) Given a list of N student records with name, ID and grade. You are supp...

Duke 275

PAT A1083 list grades (25)

#include #include using namespace std; struct stut{ char name[12]; char id[12]; int scr; }stu[105]; int cmp(stut a,stut b){ return a.scr>b.scr; } int main(){ int n,i,num=0,grade1,grade2;

momottyy的专栏 292

PAT 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 ...

weixin_42671353的博客 251

别再只会%d输出了!C/C++中二进制、八进制、十六进制的5种实战格式化技巧

本文详细介绍了C/C++中二进制、八进制、十六进制的5种实战格式化技巧,包括printf的#标志自动添加前缀、bitset库的二进制输出、进制作用域控制、自定义进制转换函数模板以及网络协议分析器的实战案例。这些技巧能帮助开发者在嵌入式开发、网络协议分析等场景中更高效地处理数据输出。

weixin_30298497的博客 280

PAT 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

solin205的专栏 791

【算法每日一练】PAT 甲级1083 java

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 recor...

梓莘 220

PAT 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 ...

Hickey_Chen的博客 237

PAT甲级真题 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 grad...

zhang35的博客 229

PAT甲级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 are in a given interval. Input Specification

weixin_42393947的博客 179

PAT 甲级 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 are in a given interval. 输入 Each input file contain

qq_45478482的博客 196
上一篇: 浙江大学PAT_甲级_1052. Linked List Sorting (25)
下一篇: 浙江大学PAT_甲级_1070. Mooncake (25)
pythontojava
博客等级 码龄12年 84粉丝 140原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址