QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#671800#9415. MatrixREN_REN#WA 0ms3532kbC++20951b2024-10-24 14:31:362024-10-24 14:31:37

Judging History

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

  • [2024-10-24 14:31:37]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3532kb
  • [2024-10-24 14:31:36]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;

#define int long long
using i128 = __int128;
int n, k;
const int N = 1000;

void solve(){
    cin >> n;
    vector ans(n + 1, vector<int>(n + 1));
    ans[1][1] = 1, ans[1][2] = 2;
    ans[2][1] = 3, ans[2][2] = 4;
    int nex = 5;
    for(int i = 3; i <= n; i += 2) {
        ans[1][i] = nex ++;
    }
    for(int i = 4; i <= n; i += 2) {
        ans[2][i] = nex ++;
    }
    for(int i = 3; i <= n; i ++) {
        for(int j = 1; j <= n; j ++) {
            ans[i][j] = nex;
        }
        nex ++;
    }
    for(int i = 1; i <= n; i ++) {
        for(int j = 1; j <= n; j ++) {
            if(ans[i][j]) cout << ans[i][j] << ' ';
            else cout << 1 << ' ';
        }
        cout << '\n';
    }
}

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    int t = 1;
 //   cin >> t;
    while(t --){
        solve();
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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)