[CodeForces - 463B] Caisa and Pylons

题目链接: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;
}
posted @ 2019-04-16 23:22  Youpeng  阅读(162)  评论(0编辑  收藏  举报