当前位置:网站首页>-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;
}
边栏推荐
猜你喜欢
大龄测试员刚迈过了 35 岁这个“坎儿”,和大家说点儿心里话
FITC标记生物素(FITC-生物素|CAS:134759-22-1)有哪些知识了?
Leetcode79. 单词搜索
CAS:851113-28-5 (生物素-ahx-ahx-酪胺)
温度响应性纳米水凝胶光子品体/纤维素修饰荧光水凝胶/载脂质体水凝胶的制备方法
Creo5.0入门教程赠素材
3.1 - 程序设计语言 3.2 - 高级语言的特点及引用 3.3 - 静态/动态类型语言
MATLB|And her ups and downs and finally reached the peak of life [Romantic Journey]
手把手教你编写性能测试用例
Why don't suggest you run in Docker Mysql?
随机推荐
基于 LSTM 的分布式能源发电预测(Matlab代码实现)
CAS:183896-00-6 (Biotin-PEG3-C3-NH2) PEG衍生物
Project (7) - PolarSeg point cloud semantic segmentation
数据的存储——C语言
[SUCTF 2019]CheckIn (.htaccess和.user.ini)
365天挑战LeetCode1000题——Day 052 逐步求和得到正数的最小值 贪心
快速响应性智能型/智能响应性聚乙二醇纳米/还原响应型水凝胶的研究与制备
线程的同步与互斥
宝塔实测-搭建LightPicture开源图床系统
Stanford CS143 速通PA1教程
西安生物素-四聚乙二醇-酰胺-4苯酚 浅黄色半固态
D-Biotinol Involved by Biotin, CAS No: 53906-36-8 Specific Properties Description
渗透测试与攻防对抗——漏洞扫描&逻辑漏洞(Part1)
7. type( )函数——查询数据类型
基于ABP的AppUser对象扩展
组件传值-作用域插槽
02|运算符
LeetCode常见题型——链表
深度剖析 Apache EventMesh 云原生分布式事件驱动架构
c语言文件基本操作总结