QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#688216#8934. Challenge NPCHTensor#WA 0ms3480kbC++231.1kb2024-10-30 00:45:212024-10-30 00:45:22

Judging History

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

  • [2024-10-30 00:45:22]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3480kb
  • [2024-10-30 00:45:21]
  • 提交

answer

#include <bits/stdc++.h>
#define dd(x) cout << #x << "\n"
#define d(x) cout << #x  << ": " << x << "\n"
#define SZ(x) ((int)(x).size())
using namespace std;
#define int long long
using pii = pair<int, int>;
using vpii = vector<pii>;
using vi = vector<int>;
using vii = vector<vector<int>>;
using a3 = array<int, 3>;
using ll = long long;
const int inf = 0x3f3f3f3f3f3f3f3fLL;

// #define MULTI_TEST

void solve() {
    int k; cin >> k;
    int cnt = 0;
    
    int n = k + 2;
    vector<pair<int, int>> edg;
    for(int i = 3; i <= 2 * n; i += 2) {
        for(int j = 1; j < (i + 1) / 2; j++) {
            edg.push_back({i, 2 * j});
            edg.push_back({i + 1, 2 * j - 1});
            ++cnt;
        }
    }

    cout << 2 * (k + 2) << " " << cnt << " " << 2 << "\n";
    for(int i = 1; i <= k + 2; i++) cout << "1 2 ";
    cout << "\n";

    for(auto [u, v] : edg) {
        cout << u << " " << v << "\n";
    }
}

signed main() {
    ios::sync_with_stdio(false); cin.tie(0);
#ifdef MULTI_TEST
    int T; cin >> T;
#else
    int T = 1;
#endif
    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: 3480kb

input:

1

output:

6 3 2
1 2 1 2 1 2 
3 2
4 1
5 2
6 1
5 4
6 3

result:

wrong answer The graph is not correct