当前位置:网站首页>-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;
}
边栏推荐
猜你喜欢

vmware Exsi 网卡配置

天猫全网商品详情封装接口
![MATLB|And her ups and downs and finally reached the peak of life [Romantic Journey]](/img/10/55cc34a929768d89d9ffde8a5b3419.png)
MATLB|And her ups and downs and finally reached the peak of life [Romantic Journey]

Leetcode79. 单词搜索

Leetcode82. 删除排序链表中的重复元素 II

flask——请求、响应、请求扩展、session、闪现、蓝图、g对象、flask-session

win10重装系统后没声音怎么办?

Involved in PEG-Biotin (CAS: 1778736-18-7) Biotin-PEG4-OH is widely used in molecular target detection

Win11怎么关闭系统保护功能?系统保护还原功能怎么关闭?

服装店管理系统如何推送活动?
随机推荐
D-Biotinol Involved by Biotin, CAS No: 53906-36-8 Specific Properties Description
算法---整数替换(Kotlin)
Kubernetes YAML编写 讲解
Tensor flow 踩坑记
安全知识培训——消防安全
【「收藏」Oracle 数据库安装】
[NCTF2019]True XML cookbook-1|XXE漏洞
2022金九银十工作潮,怎么样才能成功跳槽面试拿到高薪呢?
LSTM-based distributed energy generation prediction (Matlab code implementation)
Project (7) - PolarSeg point cloud semantic segmentation
3.11-程序基本的控制语句 3.12-表达式 3.13-数据类型 3.14-常量/变量 3.15-标识符
Stanford CS143 速通PA1教程
生物素叠氮化物中的(CAS:1527486-16-3TAMRA-azide-PEG3-Biotin)反应的特点!
技术分享 | 接口自动化测试如何处理 Header cookie
微信公众号如何开通支付功能?
[obs] obsqsv11 hard coding and comparison with metartc codec
MATLB|And her ups and downs and finally reached the peak of life [Romantic Journey]
Leetcode79. 单词搜索
Description of AirFlow
【毕业设计】基于ESP32的在线墨水屏桌面摆件 -物联网 单片机 嵌入式