#include using namespace std; typedef long long ll; signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); ll n; cin>>n; ll a[2*n]; for(int i=0;i<2*n;i++){ cin>>a[i]; } ll l[n+1]={},r[n+1]={}; for(int i=0;i