当前位置:网站首页>【华为机试真题详解】统计射击比赛成绩
【华为机试真题详解】统计射击比赛成绩
2022-07-06 05:19:00 【不太灵光的程序员】
【2022 Q1 Q2 | 100分】
前言
《华为机试真题详解 Python实现》专栏含牛客网华为专栏、华为面经试题、华为OD机试真题。
如果您在准备华为的面试,期间有想了解的可以私信我,我会尽可能帮您解答,也可以给您一些建议!
本文解法非最优解(即非性能最优)。
题目描述
给定一个射击比赛成绩单,包含多个选手若干射击的成绩分数,请对每个选手按其最高3个分数之和
进行降序排名,输出降序排名后的选手ID序列,条件如下:
- 一个选手可以有多个射击成绩的分数,且次序不固定
- 如果一个选手成绩少于3个, 则认为选手的所有成绩无效,排名忽略该选手
- 如果选手的成绩之和相等,则成绩之和相等的选手按照其ID降序排列
输入描述:
第一行,一个整数N, 表示该场比赛总共进行了N次射击,产生N个成绩分数(2<=N<=100)
第二行,一个长度为N的整数序列,表示参与每次射击的选手ID(0<=ID<=99
边栏推荐
- Talking about the type and function of lens filter
- Zoom and pan image in Photoshop 2022
- Yyds dry inventory SSH Remote Connection introduction
- Please wait while Jenkins is getting ready to work
- Hometown 20 years later (primary school exercises)
- Vulhub vulnerability recurrence 68_ ThinkPHP
- 2022半年总结
- Collection + interview questions
- Notes, continuation, escape and other symbols
- 04. 项目博客之日志
猜你喜欢

nacos-高可用seata之TC搭建(02)

图数据库ONgDB Release v-1.0.3

【OSPF 和 ISIS 在多路访问网络中对掩码的要求】

Vulhub vulnerability recurrence 71_ Unomi

Why does MySQL need two-phase commit

用StopWatch 统计代码耗时

nacos-高可用seata之TC搭建(02)

February 12 relativelayout

Can the feelings of Xi'an version of "Coca Cola" and Bingfeng beverage rush for IPO continue?

Hyperledger Fabric2. Some basic concepts of X (1)
随机推荐
Postman assertion
Hyperledger Fabric2. Some basic concepts of X (1)
Please wait while Jenkins is getting ready to work
[buuctf.reverse] 159_ [watevrCTF 2019]Watshell
February 12 relativelayout
Upload nestjs configuration files, configure the use of middleware and pipelines
Huawei od computer test question 2
HAC集群修改管理员用户密码
First acquaintance with CDN
Microblogging hot search stock selection strategy
Codeforces Round #804 (Div. 2)
Vulhub vulnerability recurrence 69_ Tiki Wiki
Imperial cms7.5 imitation "D9 download station" software application download website source code
Summary of three log knowledge points of MySQL
JS quick start (II)
Yyds dry inventory SSH Remote Connection introduction
Vite configures the development environment and production environment
Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
Postman test report
Mongodb basic knowledge summary