HDOJ1029 Ignatius and the Princess IV【AC率最高的一题】-----武科大ACM暑期集训队选拔赛3题
2012-05-08 11:44
597 查看
[align=center]Problem : 1029 ( Ignatius and the Princess IV ) Judge Status : Accepted
RunId : 5913583 Language : C Author : qq1203456195
Code Render Status : Rendered By HDOJ C Code Render Version 0.01 Beta[/align]
RunId : 5913583 Language : C Author : qq1203456195
Code Render Status : Rendered By HDOJ C Code Render Version 0.01 Beta[/align]
#include<stdio.h> #include<string.h> #include<stdlib.h> int ary[1000000]; int n; int main() { int i,k,ans; while(~scanf("%d",&n)) { memset(ary,0,sizeof(ary)); for(i=0;i<n;i++) { scanf("%d",&k); ary[k]++; if(ary[k]>=(n-(n>>1))) ans=k; } printf("%d\n",ans); } return 0; }
相关文章推荐
- ACM--最少(n+1)/2--HDOJ 1029--Ignatius and the Princess IV--水
- [ACM] hdu 1029 Ignatius and the Princess IV (动归或hash)
- HDOJ1078 FatMouse and Cheese【动态规划】-----武科大ACM暑期集训队选拔赛2题
- HDOJ1029 Ignatius and the Princess IV
- hdoj 1029 Ignatius and the Princess IV 【简单】
- HDOJ 1029:Ignatius and the Princess IV 解题报告
- HDOJ 1029 Ignatius and the Princess IV 【数论】
- HDOJ 1029 Ignatius and the Princess IV(数位dp)
- hdoj 1029 Ignatius and the Princess IV
- HDOJ 1029 Ignatius and the Princess IV 【math】
- [ACM] hdu 1029 Ignatius and the Princess IV (动归或hash)
- hdoj-1029-Ignatius and the Princess IV
- 杭电HDOJ 1029 Ignatius and the Princess IV
- 杭电OJ(HDOJ)1029题:Ignatius and the Princess IV(数论)
- HDOJ 1029 Ignatius and the Princess IV
- HDOJ 1029 Ignatius and the Princess IV
- HDOJ HDU 1029 Ignatius and the Princess IV
- hdoj 1029 Ignatius and the Princess IV
- HDOJ.1029 Ignatius and the Princess IV(map)
- HDOJ 1029 Ignatius and the Princess IV