#include #include using namespace std; // discord の図参照 int main(){ // パス上の頂点に m-2 個の子をつけて、その先に m 個の子をつけて、さらにその先に 2 つ子を作る const int m = 7; const int p = 1800;//パスの長さ const int root = 1; int target = root; vector> edges; for(int x = root + 1 ; x <=root + p ; x++){ edges.emplace_back(target,x); target = x; } const int r = target;// パスの右端 for(int x = root ; x <= r ; x++){ for(int c = 1 ; c<= m-2 ;c++){ edges.emplace_back(x,target+c); target = c; for(int d = 1 ; d <= m ; d++){ edges.emplace_back(c,target+1); edges.emplace_back(target+1,target+2); edges.emplace_back(target+1,target+3); } } } cout << (edges.size())+1 << endl; for(pair e :edges)cout << e.first << " " << e.second << endl; return 0; }