QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#788217#8934. Challenge NPC0x3fWA 0ms3616kbC++14870b2024-11-27 16:14:482024-11-27 16:14:49

Judging History

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

  • [2024-11-27 16:14:49]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3616kb
  • [2024-11-27 16:14:48]
  • 提交

answer

// Problem: C. Challenge NPC
// Contest: The 3rd Universal Cup. Stage 8: Cangqian
// URL: https://qoj.ac/contest/1780/problem/8934
// Author: Fourier_WJY
// Memory Limit: 1024 MB
// Time Limit: 1000 ms
// Copyright (c) 2023 Fourier All rights reserved.
//
// Powered by CP Editor (https://cpeditor.org)

#include <bits/stdc++.h>
#define ll long long

using namespace std;

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int k;
    cin >> k;
    vector<pair<int, int>> e;
    k += 2;
    k <<= 1;
    for (int i = 1; i <= k; i += 2)
        for (int j = 2; j < i; j += 2) e.push_back({j, i});
    cout << k << " " << e.size() << " " << 2 << "\n";
    for (int i = 1; i <= k / 2; i++) cout << "1 2 ";
    cout << "\n";
    for (auto it : e) cout << it.first << " " << it.second << "\n";
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1

output:

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

result:

wrong answer The graph is not correct