当前位置:网站首页>-Chess game-
-Chess game-
2022-08-10 01:47:00 【-JMY-】
Title description
The two students played n games of chess (3<=n<=9, and n is an odd number), their entry numbers are 10 and 20, and each game has a student who wins (that is, there is no tie), which student finally wonvictory?
Enter
In line 1 there is an integer n, which represents the competitionnumber of times.
Line 2 has n integers (the nThe integer must be 10 or 20, representing the entry number of the winning student).
Output
Output the entry number of the winning classmate.
Sample input
510 10 20 10 20
Sample output
10
Reference code:
#include
using namespace std;
int n,a[15],t[25],maxn,k;
int main(){
scanf("%d",&n);
for(int i=0;i
for(int i=0;i
if(t[a[i]]>maxn){
maxn=t[a[i]];
k=a[i];
}
}
printf("%d",k);
return 0;
}
边栏推荐
- 基于ABP的AppUser对象扩展
- PEG 衍生物Biotin-PEG1-OH(cas:95611-10-2,2-生物素氨基乙醇)优势说明
- deepstream学习笔记(三):deepstream-imagedata-multistream解析与接入适配yolov5模型测试
- How to activate the payment function on WeChat official account?
- MATLB|And her ups and downs and finally reached the peak of life [Romantic Journey]
- pytest:如何在测试中编写和报告断言
- Biotin-Cy2 Conjugate,生物素-Cy2 偶联物_Cy2 生物素偶联物
- CAS:851113-28-5 (Biotin-ahx-ahx-tyramine)
- 基于FPGA的任意字节数的串口接收(含源码工程)
- Mysql数据库 ALTER 基本操作
猜你喜欢
随机推荐
深度剖析 Apache EventMesh 云原生分布式事件驱动架构
Leetcode83. 删除排序链表中的重复元素
C language learning journey [operator (incomplete version)]
-骑士巡游-
LeetCode常见题型——链表
生物素叠氮化物中的(CAS:1527486-16-3TAMRA-azide-PEG3-Biotin)反应的特点!
Solidity 智能合约入门
WPF DataGrid 使用数据模板
02|运算符
openEuler 知:abi 检测
Characteristics of the (CAS:1527486-16-3TAMRA-azide-PEG3-Biotin) reaction in biotin azide!
Description of AirFlow
C language structure, function and pointer exercise (simple address book)
字符统计柱状图
Kubernetes 开发环境比对
【数据存储】signed,unsigned到底怎么区分?如何计算?
deepstream学习笔记(三):deepstream-imagedata-multistream解析与接入适配yolov5模型测试
重估HR SaaS:一体化后的新三年
7. type( )函数——查询数据类型
WPF DataGrid using data templates









