HDU 4593 Robot
来源:互联网 发布:复杂网络期刊 sci 编辑:程序博客网 时间:2024/05/23 01:11
直接都统计一次,出现两次就是大于1呗……
#include<stdio.h>#include<iostream>#include<math.h>#include<string.h>#include<iomanip>#include<stdlib.h>#include<ctype.h>#include<algorithm>#include<deque>#include<functional>#include<iterator>#include<vector>#include<list>#include<map>#include<queue>#include<set>#include<stack>#include<sstream>#define CPY(A, B) memcpy(A, B, sizeof(A))typedef long long LL;typedef unsigned long long uLL;const int MOD = 1e9 + 7;const int INF = 0x3f3f3f3f;const LL INFF = 0x3f3f3f3f3f3f3f3fLL;const double EPS = 1e-9;const double OO = 1e20;const double PI = acos (-1.0);int dx[]= {0,1,1,1,0,-1,-1,-1};int dy[]= {1,1,0,-1,-1,-1,0,1};using namespace std;int n,cnt[1010];int main() { while (cin >> n) { memset (cnt,0,sizeof (cnt) ); int a; for (int i=0; i<=n; i++) { scanf ("%d",&a); cnt[a]++; } int ans=0; for (int i=1; i<=n; i++) { if (cnt[i]>1) { ans=i; } } printf ("%d\n",ans); } return 0;}
0 0
- HDU 4593 Robot
- HDU 4593 Robot
- HDU 4593 Robot
- hdu 4593 Robot
- HDU 4593 Robot
- HDU 4593 Robot
- hdu 4593 Robot(签到题)
- Robot HDU
- hdu 1035 Robot Motion
- HDU 1035 Robot Motion
- HDU-1035 ROBOT NOTION
- hdu 1035 Robot Motion
- hdu 1035 Robot Motion
- hdu 4375 Programmable Robot
- hdu~4166~Robot Navigation
- hdu 1035 Robot Motion
- HDU 1035 Robot Motion
- hdu 1035 Robot Motion
- 欢迎使用CSDN-markdown编辑器
- hdu 1257 最少拦截系统(动态规划)
- linux定时任务的设置
- 编程与我
- MySQL集群系列2:通过keepalived实现双主集群读写分离
- HDU 4593 Robot
- 算法竞赛入门经典(第二版)-刘汝佳-第四章 函数与递归 信息解码
- Rxlifecycle使用
- 电视实测 一个视频看出软硬解码的差距
- 可是姑娘,你为什么要编程呢?
- 错误1error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
- 从零创建项目实践
- C语言程序设计谭浩强版 四
- [C++]高效使用c++11的一些建议