Editorial for Bedao Grand Contest 07 - PASSWORD


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Code mẫu

// Example program
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 1e6 + 7, INF = 1e9 + 7;

int a[MAXN], n, res = -INF, x;

int main()
{
    freopen("PASSWORD.INP","r",stdin);
    freopen("PASSWORD.OUT","w",stdout);
    ios_base::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    cin >> n;
    for (int i = 1; i <= n; ++i) cin >> x, res = max(res, x);
    cout << res;
}

Comments

Please read the guidelines before commenting.


There are no comments at the moment.