题目链接:http://codeforces.com/problemset/problem/463/B
求个最大值
AC代码:
#include<cstdio>
#include<climits>
using namespace std;
int main() {
int n,x;
int maxn;
while(scanf("%d",&n) != EOF) {
maxn = INT_MIN;
while(n--) {
scanf("%d",&x);
if(maxn < x)
maxn = x;
}
printf("%d\n",maxn);
}
return 0;
}