#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll INF=1LL<<55; typedef pair P; typedef pair PP; const ll MOD=998244353; const double PI=acos(-1); int main(){ int N; cin>>N; vector A(N),B(N); for(int i=0;i>A[i]; } for(int i=0;i>B[i]; } vector> C(N,vector(4)); for(int i=0;iB[i]) swap(A[i],B[i]); //A[i]<=B[i] } //C[i][0]<=C[i][1]<=C[i][2] for(int i=0;i mini; for(int i=0;i,greater> pq; for(int i=0;i