QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#401825 | #5438. Half Mixed | xjt05 | WA | 0ms | 3564kb | C++23 | 605b | 2024-04-29 15:12:18 | 2024-04-29 15:12:19 |
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;
cin>>n>>m;
while(t--)
{
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: 0ms
memory: 3564kb
input:
2 2 3 1 1
output:
Yes 101 101 Yes 101 101
result:
wrong answer Integer parameter [name=M[i][j]] equals to 101, violates the range [0, 1] (test case 1)