ZOJ2104 Let the Balloon Rise
来源:互联网 发布:淘宝css 订购 编辑:程序博客网 时间:2024/06/14 09:26
头文件string.h和string是有区别滴~
#include<iostream>#include <string>using namespace std;int main(){while(1){int num;string arr[1000];string result;cin>>num;if(num==0)break;int max=0;int i=0,j=0,sum=0;for(;i<num;i++){cin>>arr[i];sum=0;if(i==0)result=arr[i];for(j=0;j<i;j++){if(arr[i].compare(arr[j])==0){sum++;if(sum>max){max=sum;result=arr[i];}}}} cout<<result<<endl;}return 0;}
0 0
- ZOJ2104 Let the Balloon Rise
- ZOJ2104——Let the Balloon Rise
- HDU1004 ZOJ2104 Let the Balloon Rise【MAP】
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the balloon rise
- Let the Balloon Rise
- 理解类String
- SQL Server实现列的自动增长
- JSONObject.fromObject(map)(JSON与JAVA数据的转换)
- HBase在小米中的应用实践
- Android文档笔记:通知(三) - 启动活动时保存导航
- ZOJ2104 Let the Balloon Rise
- 设计模式C++实现(4)——单例模式
- OpenCV笔记(一)win7下 VC++6.0 + OpenCV1.0 平台搭建
- 朱砂在我心,倾你一世情
- iOS 获取手机的型号,系统版本,软件名称,软件版本
- ORA-32690: 散列表基础结构内存不足
- POP3和SMTP协议分析
- Android Wear预览版抢先看:智能手表最佳选择
- 在 Linux 下用户空间与内核空间数据交换的方式,第 1 部分: 内核启动参数、模块参数与sysfs、sysctl、系统调用和netlink