un_dauant @ 2023-02-10 21:10:39
#include<bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <iomanip>
using namespace std;
int main()
{
int n;
cin >> n;
int a[n*n+10];
int i = 0;
char c;
while(cin>>a[i++] && i < n*n);
int cnt = 0;
for(int j = 0 ; j < i;j++){
for(int k = 1 ; k<= a[j] ;k++){
if((j+1)&1) cout << '0';
else{
cout << '1';
}
cnt++;
if(cnt == n){
cnt =0;
cout << "\n";
}
}
}
return 0;
}
by Judgelight @ 2023-02-10 21:18:15
@un_dauant 评测机不稳定,70的可能是擦着时限过的,而50的就因为评测机慢了没过
by MindustrySF @ 2023-02-24 20:41:04
建议把时间复杂度换成空间复杂度