#include #include"testlib.h" using namespace std; using ll = long long; const ll Nmin = 1, Nmax = 100'000; const ll Amin = 0, Amax = 100'000; int main(){ registerValidation(); ll n = inf.readLong(Nmin,Nmax); inf.readEoln(); vector a(n); for (ll i = 0; i < n; i++){ if (i != 0){ inf.readSpace(); } a[i] = inf.readLong(Amin,Amax); } inf.readEoln(); inf.readEof(); ensuref(Amax >= a[0],"Amax >= A_1"); for (ll i = 1; i < n; i++){ ensuref(a[i-1] >= a[i], "A_i >= A_{i+1}"); } ensuref(a[n-1] >= Amin, "A_N >= Amin"); }