【杭电】 1004 Let the Balloon Rise
来源:互联网 发布:oracle数据库卸载教程 编辑:程序博客网 时间:2024/05/05 11:14
#include<stdio.h> #include<string.h> #define maxsize 1000 void main(){ int num,m_num,max,flag,i,j; char stArr[maxsize][15]; char temp[15]; int cal[maxsize]; scanf("%d",&num); while(num>0&&num<=1000&&num!=0){ for(i=0;i<num;i++) cal[i]=0; for(i=0;i<num;i++){ scanf("%s",temp); flag=0; for(j=0;j<num;j++){ if(strcmp(temp,stArr[j])==0){ cal[j]+=1; flag=1; break; } } if(flag==0){ strcpy(stArr[i],temp); cal[i]+=1; } } max=cal[0]; m_num=0; for(i=1;i<num;i++) if(max<cal[i]){ max=cal[i]; m_num=i; } printf("%s\n",stArr[m_num]); scanf("%d",&num); } }
0 0
- 杭电 1004[Let the Balloon Rise]
- 杭电 1004 Let the Balloon Rise
- 杭电 1004 Let the Balloon Rise
- 杭电 1004 Let the Balloon Rise
- 杭电1004 Let the Balloon Rise
- 杭电-1004 Let the Balloon Rise
- 杭电1004---Let the Balloon Rise
- 杭电1004-Let the Balloon Rise
- 【杭电】 1004 Let the Balloon Rise
- 杭电 1004 Let the Balloon Rise
- 杭电1004 Let the Balloon Rise
- [杭电]Let the Balloon Rise
- 杭电Let the Balloon Rise
- 杭电OJ Let the Balloon Rise
- 杭电problem1004- Let the Balloon Rise
- Let the Balloon Rise(杭电ACM 1004)
- 杭电acm 1004 (Let the Balloon Rise)
- 杭电ACM 1004 “+Let+the+Balloon+Rise”
- VS2013/MFC编程入门之十九(常用控件:静态文本框)
- Genymotion--问题
- Javaweb中JavaScript的Number对象
- 微信开发--自定义菜单
- 无线网络工作原理
- 【杭电】 1004 Let the Balloon Rise
- 生成和打上patch的方法
- Core Java笔记(三)
- LINQ之查询基础学习笔记(二)
- vmware vsphere 5.1 web client的使用
- Gradle脚本基础全攻略
- java反射总结
- Linux 软件包、文件查询管理常用命令
- Java的数组