QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#151596#6743. water235malpaniWA 1ms3572kbC++17494b2023-08-27 06:36:532023-08-27 06:36:57

Judging History

你现在查看的是最新测评结果

  • [2023-08-27 06:36:57]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3572kb
  • [2023-08-27 06:36:53]
  • 提交

answer

#include <bits/stdc++.h>
#include <iostream>

using namespace std;

int main()
{
    int x,y;
    cin>>x;
    cin>>y;
    
    cout<<max(x,y)-(max(x,y)-min(x,y))<<endl;
    for(int i=0;i<x;i++)
    {
        for(int j=0;j<y;j++)
        {
            if(i==j || (j>=x&&i==0&&((j-x)%2==1||j==y-1)) || (i>=y)&&j==0&&((i-y)%2==1||i==x-1))
                cout<<'1'<<" ";
            else
                cout<<'0'<<" ";
        }
        cout<<endl;
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3572kb

input:

2 1

output:

1
1 
1 

result:

wrong answer The answer is wrong: expected = 2, found = 1