HDU 1800 Flying to the Mars
来源:互联网 发布:java 代理模式详解 编辑:程序博客网 时间:2024/06/07 06:37
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1800
moving table那题的同类,找相同即可
#include<stdio.h>#include<stdlib.h>int a[3005];int cmp( const void *a , const void *b ){return *(int *)b - *(int *)a ;}int main(){int i,n,count,max;while(scanf("%d",&n)!=EOF){for(i=0;i<n;i++)scanf("%d",&a[i]);qsort(a,n,sizeof(a[0]),cmp);max = count = 1;for(i=1;i<n;i++){if(a[i-1] == a[i] ){count++;if(count > max)max = count;continue;}count = 1;}printf("%d\n",max);}return 0;}
0 0
- Flying to the Mars (hash) 1800 hdu
- hdu 1800 Flying to the Mars
- Hdu-1800 Flying to the Mars
- hdu 1800 Flying to the Mars
- hdu 1800 Flying to the Mars
- HDU-1800-Flying to the Mars
- hdu 1800 Flying to the Mars
- hdu 1800 Flying to the Mars
- hdu 1800 Flying to the Mars
- HDU 1800 Flying to the Mars
- HDU 1800 Flying to the Mars STL
- HDU -1800 Flying to the Mars
- hdu - 1800 - Flying to the Mars
- HDU 1800 Flying to the Mars(trie)
- HDU--1800 -- Flying to the Mars
- HDU-1800 - Flying to the Mars
- hdu 1800 Flying to the Mars【水水】
- HDU 1800 Flying to the Mars
- 对无边框的QT窗体设置点击任务栏按钮最小化和还原事件
- 杭电2016 min>a[i]第一次写成<,太马虎
- mysql笔记
- 农夫过河问题
- Android中自定义Application报ClassCastException错误
- HDU 1800 Flying to the Mars
- 杭电ACM2009求数列的和&&&&杭电ACM2010水仙花数----20140724
- 数据格式转换 (三)Office文档转HTML
- Java IO概述
- Ubuntu14.04编译WebRTC For Android代码 2014-07-24
- Python学习17:异常处理(二)
- UNIX高手的10个习惯
- 无线路由器一、二、三根天线有啥区别?
- 定时器