QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#617852#9415. MatrixsyssWA 0ms3560kbC++20394b2024-10-06 17:23:072024-10-06 17:23:08

Judging History

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

  • [2024-10-06 17:23:08]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3560kb
  • [2024-10-06 17:23:07]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;
    int now = 1;
    cout << "Yes\n";
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            cout << now << ' ';
            now = now % (2 * n) + 1;
        }
        cout << '\n';
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3556kb

input:

2

output:

Yes
1 2 
3 4 

result:

ok Correct. (1 test case)

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3560kb

input:

3

output:

Yes
1 2 3 
4 5 6 
1 2 3 

result:

wrong answer The number of quadruples 6 is invalid. (test case 1)