QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#151593#6743. water235malpaniWA 1ms3604kbC++17430b2023-08-27 06:16:372023-08-27 06:16:39

Judging History

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

  • [2023-08-27 06:16:39]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3604kb
  • [2023-08-27 06:16:37]
  • 提交

answer

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

using namespace std;

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

    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3540kb

input:

2 1

output:

2
1 
1 

result:

ok The answer is correct.

Test #2:

score: 0
Accepted
time: 1ms
memory: 3512kb

input:

3 3

output:

3
1 0 0 
0 1 0 
0 0 1 

result:

ok The answer is correct.

Test #3:

score: -100
Wrong Answer
time: 1ms
memory: 3604kb

input:

1 4

output:

4
1 1 1 1 

result:

wrong answer The answer is wrong: expected = 3, found = 4