QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#633141#9415. Matrixretired_midlightsWA 0ms3844kbC++14811b2024-10-12 14:37:512024-10-12 14:37:56

Judging History

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

  • [2024-10-12 14:37:56]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3844kb
  • [2024-10-12 14:37:51]
  • 提交

answer

#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = (int)a; i <= (int)b; i ++)
#define per(i, a, b) for(int i = (int)a; i >= (int)b; i --)
#define ll long long
using namespace std;

void solve() {
    int n;
    cin >> n;
    vector < vector < int > > a(n + 5, vector < int > (n + 5));
    rep(i, 1, n - 2) rep(j, 1, n) a[i][j] = i;
    rep(i, 1, n - 2) a[n - 1][i] = a[n][i] = i + n - 2;
    a[n - 1][n - 1] = 2 * n - 3;
    a[n - 1][n] = 2 * n - 2;
    a[n][n - 1] = 2 * n - 1;
    a[n][n] = 2 * n;
    rep(i, 1, n) rep(j, 1, n) cout << a[i][j] << " \n"[j == n];
}
int main() {
// #define LOCAL
#ifdef LOCAL
    freopen("data.in", "r", stdin);
#endif
    ios :: sync_with_stdio(false);
    cin.tie(0);
    int T = 1;
    // cin >> T;
    while(T --) solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3844kb

input:

2

output:

1 2
3 4

result:

wrong answer Line [name=yesno] equals to "1 2", doesn't correspond to pattern "Yes|No" (test case 1)