#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define BET(a,b,c) ((a)<=(b)&&(b)<(c)) #define FOR(i,n) for(int i=0,i##_end=(int(n));i VI; typedef vector VVI; int main() { int N; cin>>N; VI A(N); FOR(i,N) cin>>A[i]; int sum = 0 ; FOR(i,N) sum += A[i]; int L = 1; while((L+1)*(L+1)<=sum) L++; int up = 0, down = 0 ; FOR(i,2*L-1){ int x = i < SZ(A) ? A[i] : 0; int y = min(i+1, 2 * L - 1 - i); //cout<