【PAT (Advanced Level) Practice】1041 Be Unique (20 分)
1041 Be Unique (20 分)
Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,10
4
]. The first one who bets on a unique number wins. For example, if there are 7 people betting on { 5 31 5 88 67 88 17 }, then the second one who bets on 31 wins.
Input Specification:
Each input file contains one test case. Each case contains a line which begins with a positive integer N (≤10
5
) and then followed by N bets. The numbers are separated by a space.
Output Specification:
For each test case, print the winning number in a line. If there is no winner, print None instead.
Sample Input 1:
7 5 31 5 88 67 88 17
Sample Output 1:
31
Sample Input 2:
5 888 666 666 888 888
Sample Output 2:
None
#include<iostream>
#include<vecto
【PAT (Advanced Level) Practice】1041 Be Unique (20 分)相关推荐
- 【PAT (Advanced Level) Practice】1008 Elevator (20 分)
#include<iostream> #include<cstdio> #include<cstdlib> #include<string> #incl ...
- 【PAT甲级 LinkedHashMap】1041 Be Unique (20 分) Java、C++版
题目 题目的意思是,找到第一个不重复的元素.输出它. 一开始用Java做,试了好多种方法都超时.后来换用C++通过了. AC题解:C++版 用Java尝试了各种方式,都是后两个测试点过不去,只好换C+ ...
- PAT (Advanced Level) Practice 1011 World Cup Betting (20 分) 凌宸1642
PAT (Advanced Level) Practice 1011 World Cup Betting (20 分) 凌宸1642 题目描述: With the 2010 FIFA World Cu ...
- PAT (Advanced Level) Practice 题解代码 - II (1051-1100)
PAT PAT (Advanced Level) Practice - II(1051-1100) -------------------------------------------------- ...
- PAT (Advanced Level) Practice 题目集合(1001 ~ 1050)(正在更新)
1001 A+B Format (20 分) 题目大意:计算a+b,结果按照西方的那种写数字的方式输出,从三个数一个逗号那种. #include<bits/stdc++.h> using ...
- PAT (Advanced Level) Practice 1043 Is It a Binary Search Tree (25 分) 凌宸1642
PAT (Advanced Level) Practice 1043 Is It a Binary Search Tree (25 分) 凌宸1642 题目描述: A Binary Search Tr ...
- 【PAT (Advanced Level) Practice】1124 Raffle for Weibo Followers (20 分)
1124 Raffle for Weibo Followers (20 分) John got a full mark on PAT. He was so happy that he decided ...
- 【PAT (Advanced Level) Practice】1054 The Dominant Color (20 分)
1054 The Dominant Color (20 分) Behind the scenes in the computer's memory, color is always talked ab ...
- 【PAT (Advanced Level) Practice】1120 Friend Numbers (20 分)
1120 Friend Numbers (20 分) Two integers are called "friend numbers" if they share the same ...
最新文章
- css选择器顺序的小技巧
- C#程序以管理员权限运行
- 6-5 软件测试与测试优先的编程
- 在HTML中标记tel是什么意思,'tel'属性在AEM 6.1的经典UI中富文本编辑器中的锚标记的href中不起作用...
- 【数据结构】图文例题详解单调栈与单调队列
- NekoHtml 解析内容时需要注意的地方
- k8s1.18-kubeadm安装手册
- vue 之手机号验证、正则验证手机号是否正确、手机号验证码信息弹窗
- 织梦banner图后台添加
- Linux LCD 驱动
- vcs 覆盖率收集2——覆盖率选项 + 合并覆盖率
- AI行业态势感知(第七期)
- mysql表格时间函数大全_mysql汇总数据函数
- web开发之长度单位:px, pt, rem, vw, vh
- 牛顿插值法法——Java
- 手柄映射键盘_摆脱映射激活烦恼,北通E1手游转换器游戏体验
- Naive Bayes笔记
- 使用aggregate函数计算平均数
- 内存单元之间的换算关系
- Python中字典方法总结
热门文章
- scrapy安装出错
- The NVIDIA driver on your system is too old
- retinaface人脸姿态
- device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/dev
- error C2589: “(”: “::”右边的非法标记;error C2059: 语法错误 : “::”
- qt5 中文乱码解决
- Python Numba实现GPU加速
- Python 字符串大小写转换,值域范围
- ubuntu 关闭显示,关闭显卡,命令与图形切换
- Day01 你如何保持健康