A1062(25)

【WILEY】wiley期刊投稿详解:从revision到Accepted全流程实例讲解 注意:包括没标注修改位置的word文件和标注了修改位置的word文件。 阅读详情

德才论
看题目可能会觉得简单,但是实际的话会有些麻烦。注意根据题意将输出分为四个类别,即德才均达标,德达标,德大于才,其余。先按照类比来比较,类别相同,比较总分,总分相同比较德分,均相同比较id大小,本题没有特别明显的坑点,熟练掌握即可
tie有达成平局的意思
代码如下

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
const int maxn=100010;
struct people
{
	int id;
	int talent;
	int virture;
	int total;
	int flag;
}a[maxn];
bool cmp(people b,people c)
{
	if (b.flag!=c.flag)return b.flag<c.flag;
	else if (b.total!=c.total) return b.total>c.total;
	else if (b.virture!=c.virture)return b.virture>c.virture;
	else return b.id<c.id;
}
int main()
{
	int n,m=0,low,high;
	cin>>n>>low>>high;
	for (int i=0;i<n;i++)
	{
		scanf("%d%d%d",&a[m].id,&a[m].virture,&a[m].talent);
		a[m].flag=0;
		if(a[m].talent<low||a[m].virture<low)
		   continue;
		a[m].total=a[m].talent+a[m].virture;
		if (a[m].talent>=high&&a[m].virture>=high)
		a[m].flag=1;
		else if(a[m].talent<high&&a[m].virture>=high)
		a[m].flag=2;
		else if(a[m].virture>=a[m].talent)
		a[m].flag=3;
		else 
		a[m].flag=4;
		 m++;  	
	}
	sort(a,a+m,cmp);
	printf("%d\n",m);
	for (int i=0;i<m;i++)
	{
		printf("%d %d %d\n",a[i].id,a[i].virture,a[i].talent);
	}
}


YOLOv11改进 | 网络结构代码逐行解析(二) | yolov11中的Mosaic增强详解 本文给大家带来的是YOLOv10中的Mosaic增强代码的详解,可能有部分人对于这一部分比较陌生,有的读者可能知道Mosaic增强但是不知道其工作原理,具体来说Mosaic增强就是指我们的数据集中的图片在输入给模型之前的一个处理过程(我们的图片并不是直接就输入给模型了,大家的训练结果中的结果检测图片大家可以看到数据集中多个图片会组合在一起这就是简单的Mosaic增强),下面我就来讲解一下其在YOLOv10中工作原理和代码定义,下面图片为一个Mosaic增强后的图片。​。 阅读详情

相关推荐

badusb详细制作教程(两种方式实现远控)

badusb是一种几乎可以突破任何杀毒软件和防火墙的设备,堪称渗透测试利器 文章目录前言一、什么是badusb?二,badusb的优点三,badusb是如何攻击的?badusb原理HID攻击漏洞产生原因三、准备步骤1.设备2,编辑器的安装与设置四,编写代码(重点)第一种: SEToolkit + badusb实现PowerShell注入攻击第二种:Cobalt Strike + badusb 实现PowerShell注入攻击五,烧录六,badusb有多强大攻击场景总结 BadUSB是《黑客军团》中

Ghost_system的博客 1万+

【PAT甲级A1062】Talent and Virtue (25分)(c++)

1062 Talent and Virtue (25分) 作者:CHEN, Li 单位:浙江大学 代码长度限制:16 KB 时间限制:400 ms 内存限制:64 MB About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people’s talent and virtue. According to his theory, a man being outst

小庄同学的博客 447

Claude Skills 深度讲解

阶段 1:Function Call(2023)├─ 大模型可以调用外部工具├─ 问题:缺乏对任务的深度理解└─ 局限:工具调用简单线性阶段 2:MCP 上下文工程(2024)├─ 大模型有了更丰富的上下文和工具├─ 问题:仍然需要手动编写复杂的 Prompt└─ 局限:每次对话都需要重新加载上下文阶段 3:Claude Skills(2025)├─ 大模型有了「能力模块」的概念├─ 可以动态加载、组合、执行专门的工作流├─ 真正实现了「知识的模块化和复用」

u013134676的博客 1465

1062 Talent and Virtue (25 分)——PAT A

1062Talent and Virtue(25分) About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outs...

weixin_42769575的博客 184

持续集成介绍及Jenkins自动化测试部署

学习持续集成及jenkins的自动化测试部署

ouihsiad的博客 4577

全局子程序 参数调用

为什么要子程序: 为了实现程序结构化,我们尽量使用不同功能的功能块来实现一些特定的功能, 子程序接口: 使用过程的注意事项,尤其是数组使用时的注意事项 从一个主程序中可以将参数传递到局部或全局子程序和函数中。 怎样传递参数有 2 种方式: 作为 IN 参数 变量值在主程序中保持不变。 这种传递方式也称为“ 值传递 (Call by Value)”。 作为 OUT 参数 子程序读取并更改该值,然后将新值写回到主程序中。 这种传递方式也称为“Call by Reference”。 举例说明 1 DEF MY

Eric_Yang1024的博客 1095

PAT A1062 Talent and Virtue (25分)

About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people’s talent and virtue. According to his theory, a man being outstanding in both talent and virt...

水煮大鸡蛋的博客 266

【Claude Code 源码解析教程】总体大纲

本教程旨在深入解析 Anthropic Claude Code 项目的源码架构和实现细节。Claude Code 是一个基于 TypeScript + Bun 构建的 AI 编程助手 CLI 工具,代号 "Tengu",具有复杂的多模块架构和丰富的功能特性。本教程基于Claude Code 的源码分析来生成,将帮助您全面掌握 Claude Code 的源码架构和实现细节,为开发类似 AI 编程助手工具奠定坚实基础。

rengang66的博客 388

PAT B1015A1062德才论(25)

题目描述 宋代史学家司马光在《资治通鉴》中有一段著名的“德才论”:“是故才德全尽谓之圣人,才德兼亡谓之愚人,德胜才谓之君子,才胜德谓之小人。凡取人之术,苟不得圣人,君子而与之,与其得小人,不若得愚人。” 现给出一批考生的德才分数,请根据司马光的理论给出录取排名。 输入格式 输入第一行给出 3 个正整数,分别为:N(≤10^5),即考生总数;L(≥60),为录取最低分数线,即德分和才分均不...

weixin_38170137的博客 120

Carla运行显示The following component(s) are required to run this program:DirectX Runtime |nvapi64.dll没有被

Carla运行显示The following component(s) are required to run this p 参考: 【1】EPIC 启动游戏提示The following component(s) are required to run this program:... - 『悬赏问答区』 - 吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cnhttps://www.52pojie.cn/thread-1485651-1-1.html ...

anananajiushiwo的博客 5万+

Unity中的Timeline

Timeline与动画系统类似,但是它可以针对多个物体做出一系列多个动画,它可以创建多个轨道,对象激活与隐藏轨道,动画轨道,声音轨道等。每个轨道都可以单独编辑,轨道内的不同资源可以排列并且融合

L的博客 1万+

PAT甲级A1062 Talent and Virtue (25 分)

About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outstanding in both talent and virt...

vir_lee的博客 294

YOLOv8改进 | 主干篇 | 利用MobileNetV2替换Backbone(轻量化网络结构)

本文给大家带来的改进机制是,其是专为移动和嵌入式视觉应用设计的轻量化网络结构。这些模型基于简化的架构,并利用深度可分离卷积构建轻量级深度神经网络,其引入了两个简单的全局超参数,用于在延迟和准确性之间进行有效的权衡。实验表明,MobileNets在资源和准确性的权衡方面表现出色,并在多种应用(如对象检测、细粒度分类、面部属性识别和大规模地理定位)中展现了其有效性,这个模型非常适合轻量化的读者来使用。适用检测目标:轻量化网络结构适合轻量化的读者⭐⭐⭐⭐。

Snu77的博客 5686

PAT A 1062 Talent and Virtue (25分)

一、思路 排序模板题 二、代码 #include <cstdio> #include <vector> #include <algorithm> using namespace std; typedef struct { int ID, virtue, talent, total; }person; int cmp( person a, person b...

Siumai's Blog 156

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

A1062 Talent and Virtue (25 分)

#include&lt;cstdio&gt; #include&lt;cstring&gt; #include&lt;algorithm&gt; using namespace std; struct student { int talent,virtue,sum; char id[10]; int flag;//区别是第几类 }stu[100100]; bool cmp(student a...

A_Aria的博客 140

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

PAT A1062. Talent and Virtue (25)

1062. Talent and Virtue (25)About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people’s talent and virtue. According to his theory, a man being outstand

QiMinghao的博客 402

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

A1062 Talent and Virtue (25 分)

#include <cstdio> #include <cstdlib> #include <string> #include <iostream> #include <algorithm> #include <cmath> #include <cctype> using namespace std; type...

破烂仙人 120

PAT A 甲级 1062 Talent and Virtue (25分)

1062 Talent and Virtue (25分) 吐槽 又是个描述看半天的题目。 以及题面中居然出现了中文了! 说起来我一开始还纠结了一会儿是不是错把司马迁打成司马光了,结果司马光还真是史学家,甚至是《资治通鉴》的主编……我就记得他和王安石扯皮了。 思路 直接搞四个vector,保存不同的人,然后都sort一次。也没啥好多说的。 当然cin和cout要改scanf和printf不然会超时。...

虚境的博客 193

A1062. Talent and Virtue (25)

时间限制 200 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Li About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talk

shuest的博客 343

PAT A1062 Talent and Virtue (25 分) 排序

题目大意:给出N名考生的成绩,以及两个下限 L 和 H。每个考生的成绩由v 和 t 两个分数组成,只有二者都不小于L的参与排名。其中, v 和 t 都不小于H的,属于 sage;v 不小于 H 但 t 小于H的,属于 noblemen;v 和 t 都小于 H 但 v 不小于 t的,属于 foolmen;其余参与排名的都属于 rest。每个分类中,按总成绩从高到低排名,总成绩相同者按 v从...

HackingGate的博客 155

A1062 Talent and Virtue (25)

未完成的代码 #include #include using namespace std; struct Grade{ int num,de,cai,sum,flag; }stu[100010]; bool cmp(Grade a,Grade b){ if(a.flag!=b.flag) return a.flag < b.flag; else if(a.sum!=b.sum) ret

一叶知秋 276

pat 甲级 排序 A1062 Talent and Virtue (25分)

1062 Talent and Virtue (25分) About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outstanding in both talent and virtue must be a "sage(圣人)"; b

weixin_42358356的博客 171

B1015/A1062 德才论 (25 分)(排序)

宋代史学家司马光在《资治通鉴》中有一段著名的“德才论”:“是故才德全尽谓之圣人,才德兼亡谓之愚人,德胜才谓之君子,才胜德谓之小人。凡取人之术,苟不得圣人,君子而与之,与其得小人,不若得愚人。” 现给出一批考生的德才分数,请根据司马光的理论给出录取排名。 输入格式: 输入第一行给出 3 个正整数,分别为:N(≤10​5​​),即考生总数;L(≥60),为录取最低分数线,即德分和才分均不低于L...

julia7_的博客 211

A1062 Talent and Virtue (25 分)

16分代码 #include <iostream> #include <algorithm> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ const int MAX = 100010; struct user{ string id; int vir; int ten; }.

alovelypeach的博客 310
上一篇: A1025(25)
下一篇: A1012(25)
coder_Kim
博客等级 码龄8年 2粉丝 160原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值