#include<bits/stdc++.h> #define endl '\n' #define all(x) x.begin(), x.end() #define all_(x) x.begin() + 1, x.end() using namespace std; using ll = long long; using vi = vector<int>; int main() { ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); int n; cin >> n; vi vt(n); for(int &a...