#include using namespace std; #define ll long long #define rep(i,n) for(int i=0;i> N; cout << 2*N-1 << endl; vector> a(2*N-1,vector(N)); rep(i,N){ int s = 2*i+1; rep(j,s) a[j][i] = s; int k = 2*N-1-s; rep(j,k) a[j+s][i] = k; } rep(i,2*N-1){ rep(j,N){ cout << a[i][j] << " "; } cout << endl; } //cout << ans << endl; }