#include using namespace std; /******* All Required define Pre-Processors and typedef Constants *******/ #define all(cont) cont.begin(), cont.end() #define rall(cont) cont.end(), cont.begin() #define rep(i,n) for(int i=0; i<(n); ++i) #define rep1(i,n) for(int i=1; i<=(n); ++i) #define Dcout(a) cout << setprecision(20) << a << endl #define MP make_pair #define PB push_back #define EPS 1e-9 #define PI 3.1415926535897932384626433832795 #define MOD 1000000007 using ll = long long; using PAIR = pair; using Graph = vector>; //const ll INF = (1LL << 60); //const double pi=acos(-1.0); #define debug cout << "line : " << __LINE__ << " debug" << endl /****** Template of some basic operations *****/ template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } /**************************************/ /******** User-defined Function *******/ /**************************************/ /********** Main() function **********/ int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector a(n); rep(i,n) cin >> a[i]; int d = n-1; for(int i=n-1; i>0; --i){ for(int j=0; j