博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CDZSC_2015寒假新人(1)——基础 a
阅读量:7106 次
发布时间:2019-06-28

本文共 1202 字,大约阅读时间需要 4 分钟。

Description

Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color and find the result. 
This year, they decide to leave this lovely job to you. 
 

Input

Input contains multiple test cases. Each test case starts with a number N (0 < N <= 1000) -- the total number of balloons distributed. The next N lines contain one color each. The color of a balloon is a string of up to 15 lower-case letters. 
A test case with N = 0 terminates the input and this test case is not to be processed. 
 

Output

For each case, print the color of balloon for the most popular problem on a single line. It is guaranteed that there is a unique solution for each test case. 
 

Sample Input

5 green red blue red red 3 pink orange pink 0
 

Sample Output

red pink
 
2 #include
3 #include
4 using namespace std; 5 int main() 6 { 7 char a[1500][20]; 8 int b[1500],m; 9 int n;10 while((scanf("%d",&n))&&n!=0)11 {12 m=0;13 for(int i=0;i

 

转载于:https://www.cnblogs.com/guofeng1022/p/4238754.html

你可能感兴趣的文章
wordpress调用函数大全
查看>>
触发器四(学习笔记)
查看>>
[LeetCode] Excel Sheet Column Number 求Excel表列序号
查看>>
Javascript闭包简单理解
查看>>
Android ---paint类
查看>>
spin_lock &amp; mutex_lock的差别?
查看>>
多种方法求解八数码问题
查看>>
VS2008下直接安装使用Boost库1.46.1版本号
查看>>
curl命令具体解释
查看>>
mysql update常见实例
查看>>
MFC显示GIF动画图片
查看>>
【HDU】4336 Card Collector
查看>>
Java正則表達式入门
查看>>
Linux进程间通信——使用命名管道
查看>>
C++编译器默默编写并调用哪些函数
查看>>
LoaderManager使用详解(二)---了解LoaderManager
查看>>
LeetCode - Longest Common Prefix
查看>>
【转】Chrome保存mhtml网页文件的方法 – 无需任何插件,完美!
查看>>
Android 防止控件被重复点击
查看>>
C#中关于系统用户信息持久化(接上文)
查看>>