博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
HDOJ 1004题 Let the Balloon Rise strcmp()函数
阅读量:7198 次
发布时间:2019-06-29

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

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
代码:
#include 
#include
#include
#include
using namespace std;int main(){ int n,i,j,s=1,b[1010],f[1010]; char a[1010][20]; while(~scanf("%d",&n)&&n) { memset(b,0,sizeof(b)); for(i=0; i
 

转载地址:http://pvkum.baihongyu.com/

你可能感兴趣的文章
C语言(1)
查看>>
java.sql.SQLException: Io 异常: Got minus one fro...
查看>>
PHP处理字符串
查看>>
数据库根据键值自动判断插入还是更新的SQL
查看>>
给你一个正整数列表 L, 如 L=[2,8,3,50], 输出L内所有数字的乘积末尾0的个数
查看>>
获取客户端IP地址
查看>>
RabbitMQ内存与磁盘管理
查看>>
网络渲染服务如何让你满意?
查看>>
渲染狂欢ing
查看>>
CSS各种形状
查看>>
SQL语句重复数据取一条
查看>>
多次调用 android onmesure onlayout
查看>>
Matlab教程2_ 绘图 _ 二维
查看>>
五种情况下Win7或重蹈Vista覆辙
查看>>
Timer定时器
查看>>
Win7、Ubuntu双系统正确卸载Ubuntu系统
查看>>
两数互换的例子
查看>>
我的友情链接
查看>>
网络拓扑自动发现-Sugarnms智能网管软件的基础
查看>>
线程的状态转换图
查看>>