QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#343424#6189. Full Clue Problemucup-team1198#WA 1ms3540kbC++201.3kb2024-03-02 15:49:012024-03-02 15:49:02

Judging History

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

  • [2024-03-02 15:49:02]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3540kb
  • [2024-03-02 15:49:01]
  • 提交

answer

#include <map>
#include <set>
#include <array>
#include <cmath>
#include <deque>
#include <bitset>
#include <random>
#include <string>
#include <vector>
#include <cassert>
#include <complex>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>

using namespace std;


int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    
    int n;
    cin >> n;
    vector<vector<int>> tab(n + 2, vector<int>(n + 2, 0));

    // tab[0][0] = 3;
    // tab[n - 1][n - 1] = 3;

    for (int i = 1; i <= n; ++i) {
        tab[i][i - 1] = 2;
        tab[i][i] = 2;
        tab[i][i + 1] = 2;
    }
    tab[1][1] = tab[n][n] = 3;

    for (int i = 1; i <= n; ++i) {
        for (int j = 1; j <= n; ++j) {
            cout << tab[i][j] << " ";
        }
        cout << '\n';
    }
    cout << '\n';

    for (int t = -1; t < 2; t += 2) {
        for (int i = 0; i < n; ++i) {
            for (int j = 0; j < n; ++j) {
                if (i == j || (i + t == j)) {
                    cout << 1 << " ";
                } else {
                    cout << 0 << " ";
                }
            }
            cout << '\n';
        }

        cout << '\n';
    }


    return 0;
}

詳細信息

Test #1:

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

input:

5

output:

3 2 0 0 0 
2 2 2 0 0 
0 2 2 2 0 
0 0 2 2 2 
0 0 0 2 3 

1 0 0 0 0 
1 1 0 0 0 
0 1 1 0 0 
0 0 1 1 0 
0 0 0 1 1 

1 1 0 0 0 
0 1 1 0 0 
0 0 1 1 0 
0 0 0 1 1 
0 0 0 0 1 


result:

wrong answer (2, 0) doesn't satisfy with clues