#include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define fi first #define se second #define mp make_pair const int inf=1e9+7; const ll mod=1e9+7; int main() { int N; cin>>N; vector > >arr(N); int tmp; for(int i=0;i>tmp; tmp--; arr[tmp].push_back(make_pair(i, j)); } } vector xarr; vector x1; for(int i=0;i