博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
HDU1004 查气球
阅读量:4672 次
发布时间:2019-06-09

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

Let the Balloon Rise

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)

Total Submission(s): 102132    Accepted Submission(s): 39192

Problem 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
 

 

Author
WU, Jiazhi
 

 

Source
 

 

Recommend
JGShining   |   We have carefully selected several similar problems for you:            
#include 
#include
#include
#include
#include
using namespace std;int main(){ int i,j,n,t; while (cin>>n&&n) { char c[1005][20]; int a[1005]; memset(a,0,sizeof(a)); for (i=0;i
>c[i]; for (j=0;j
max) { max=a[i]; t=i; } } cout<
<

 

转载于:https://www.cnblogs.com/Ritchie/p/5425308.html

你可能感兴趣的文章
error: No implicit Ordering defined for Any
查看>>
纹理定义
查看>>
第15届创新英语大赛范文
查看>>
作用域笔记
查看>>
【poj3375】 Network Connection
查看>>
【uoj207】 共价大爷游长沙
查看>>
windows server2003 xp化
查看>>
开始→运行(cmd)命令大全
查看>>
修改mysql数据库名称
查看>>
java中四种引用类型
查看>>
SharePoint 2007 "Select People and Groups"中搜索不到其他Domain账户的问题[已解决]
查看>>
yafu安装使用方法以及mismatched parens解决方法
查看>>
浅谈压缩感知(十六):感知矩阵之RIP
查看>>
java中使用字符(字节)读取文本内容
查看>>
mysql联表查询
查看>>
day01
查看>>
2017/2/27
查看>>
全编译报错
查看>>
梯度下降算法
查看>>
高性能JavaScript(您值得一看)
查看>>