QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#667952#8934. Challenge NPC333zhanWA 18ms7384kbC++201002b2024-10-23 10:02:392024-10-23 10:02:57

Judging History

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

  • [2024-10-23 10:02:57]
  • 评测
  • 测评结果:WA
  • 用时:18ms
  • 内存:7384kb
  • [2024-10-23 10:02:39]
  • 提交

answer

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

using namespace std;

constexpr int n = 1024;
constexpr int m = 262144;
constexpr int c = 2;

void solve () {
    int k;
    cin >> k;

    vector <pair <int, int>> edge;
    for (int i = 3; i <= n; i += 2) {
        for (int j = 2; j <= i; j += 2) {
            edge.push_back ({i, j});
        }
    }
    for (int i = 2; i <= n; i += 2) {
        for (int j = 1; j <= i; j += 2) {
            edge.push_back ({i, j});
        }
    }

    cout << n << " " << m << " " << c << '\n';

    for (int i = 1; i <= n; i ++) {
        if (i & 1) {
            cout << 1 << " ";
        } else {
            cout << 2 << " ";
        }
    }
    cout << '\n';

    for (auto [x, y] : edge) {
        cout << x << " " << y << '\n';
    }
}

signed main () {
    ios::sync_with_stdio (false);
    cin.tie (nullptr);

    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: 18ms
memory: 7384kb

input:

1

output:

1024 262144 2
1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...

result:

wrong answer The graph is not correct