#include using namespace std; int a[1001][1001]; int main(){ int i,j,n; cin >> n; for(i=0;i=n) a[i][j] = 1; }else{ if(i + j>=n) a[i][j] = 2; else a[i][j] = 1; } } } for(i=0;i