提交时间:2022-08-03 17:46:49

运行 ID: 57050

#include<bits/stdc++.h> //1145141919810 using namespace std; int n,a[114],k=0; int main(){ cin>>n; cout<<n<<endl; for(int i=1;i<=n;i++){ k++; for(int j=1;j<=n;j++){ if(j<=k) cout<<(k+1)%2; else cout<<k%2; } cout<<endl; } return 0; }