QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#459830#8474. Matrices and Sumsabbcc_1WA 1ms3600kbC++20468b2024-06-30 14:19:232024-06-30 14:19:24

Judging History

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

  • [2024-06-30 14:19:24]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3600kb
  • [2024-06-30 14:19:23]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

using i64 = long long;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin >> n;
    if (n & 1) {
        cout << "NO\n";
    } else {
        cout << "YES\n";
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= n; j++) {
                cout << (2 * j <= n) - (i + j > n + 1) << " \n"[j == n];
            }
        }
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2

output:

YES
1 0
1 -1

result:

wrong answer Line "YES" doesn't correspond to pattern "No|Yes"