#include using namespace std; typedef unsigned int uint; typedef long long int ll; typedef unsigned long long int ull; #define debugv(v) printf("L%d %s => ",__LINE__,#v);for(auto e:v){cout< ",__LINE__,#m);for(int x=0;x<(w);x++){cout<<(m)[x]<<" ";}cout<>=1,k++)s=(s<<1)|(u&1);for(;0>=1)cout<<(s&1);}} #define TIME chrono::system_clock::now() #define MILLISEC(t) (chrono::duration_cast(t).count()) namespace{ std::chrono::system_clock::time_point t; void tic(){t=TIME;} void toc(){fprintf(stderr,"TIME : %lldms\n",MILLISEC(TIME-t));} } template ostream& operator <<(ostream &o,const pair p){o<<"("<> vertex_to; UndirectedGraph(size_t n):n(n),vertex_to(n){} void connect(int from, int to){ vertex_to[from].emplace_back(to); vertex_to[to].emplace_back(from); } vector& operator[](int v){ return vertex_to[v]; } void resize(size_t _n){ n = _n; vertex_to.resize(_n); } size_t degree(int v){ return vertex_to[v].size(); } }; int width,height; int m,n; int main(){ int i,j,k; int x,y,a,b; UndirectedGraph graph(12000); cin >> n; for (i=0;i