QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#401826 | #5438. Half Mixed | xjt05 | WA | 1ms | 3616kb | C++23 | 607b | 2024-04-29 15:13:04 | 2024-04-29 15:13:04 |
Judging History
answer
#include<iostream>
#include<algorithm>
#include<math.h>
#include<string>
#include<string.h>
#include<queue>
#include<deque>
#include<vector>
#include<map>
#include<set>
#pragma GCC optimize(3,"Ofast","inline")
#define endl "\n"
using namespace std;
typedef long long ll;
ll n,m;
int main()
{
ll n,m,t;
cin>>t;
while(t--)
{
cin>>n>>m;
if((1+n)*n/2*m*(m+1)/2%2==1)
{
cout<<"No"<<endl;
}
else
{
cout<<"Yes"<<endl;
for(ll i=1;i<=n;i++)
{
for(ll j=1;j<=m;j++)
{
if(j%2==1)
cout<<1;
else
cout<<0;
}
cout<<endl;
}
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3616kb
input:
2 2 3 1 1
output:
Yes 101 101 No
result:
wrong answer Integer parameter [name=M[i][j]] equals to 101, violates the range [0, 1] (test case 1)