我觉得这道题的检测存在问题,我的代码样例能过,可以参考一下。
#include<iostream>
using namespace std;
int main(){
int n;cin >> n;
int c = -1,flog = 1;
for(int i = 0;i<7;i++){
for(int j = 0;j<7;j++){
if(c <= 0){
cin >> c;
flog = !flog;
}
cout << (char)(flog+'0')<<" ";
c--;
}
cout << endl;
}
return 0;
}