#include<iostream> #include<cstdio> #include<algorithm> using namespace std; #define LL long long LL n,t,x,y,ans,sg[100][100],mex[1000]; void getsg(){ LL index=0; for (LL l=2;l<=60;l++){ for (LL i=1;i<l;i++){ LL j=l-i; ++index; for (LL k=1;k<i;k++) mex[sg[k][i-k]]=index; for (LL k=1;k<j;k++) mex[sg[k][j-k]]=index; for (LL k=0;mex[k]==index;k++) sg[i][j]=k+1; } } for (LL i=1;i<=30;i++){ for (LL j=1;j<=30;j++) printf("%d ",sg[i][j]); puts(""); } } int main(){ getsg(); return 0; }
|