#include #include #include #include #include #include #include #include using namespace std; #define long __int64 //#define __int64 long long #define REP(i,a,b) for(int i=a;i> n; rep(i,n){ cin >> from[i]; sum += from[i]; } check = 4; weight = 1; while(sum >= check){ weight += 2; check += weight + 2; } for(int i=0; i<=weight/2; i++){ to[i] = i + 1; to[weight-i-1] = i + 1; } for(int i=0; i