大神help me
查看原帖
大神help me
666853
Liyunheng2012楼主2024/11/25 21:00

WHY?

本地过了,提交全WA了
#include<bits/stdc++.h>
using namespace std;
int n,t,sum,sum2;
bool f;
int main(){
	cin.tie(0);
	cout.tie(0);
	cin>>n>>t;
	while(n*n!=sum){
		sum++;
		sum2++;
		t--;
		if(f){
			cout<<1<<' ';
		}else{
			cout<<0<<' ';
		}
		if(t==0){
			f=!f;
			cin>>t;
		}
		if(sum2==n){
			cout<<'\n';
			sum2=0;
		}
	}
	return 0;
}
2024/11/25 21:00
加载中...