QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#556078#8934. Challenge NPCucup-team3519#WA 15ms5128kbC++20817b2024-09-10 14:54:152024-09-10 14:54:16

Judging History

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

  • [2024-09-10 14:54:16]
  • 评测
  • 测评结果:WA
  • 用时:15ms
  • 内存:5128kb
  • [2024-09-10 14:54:15]
  • 提交

answer

#include <bits/stdc++.h>

void solve() {
    // i * 2 - 1, i * 2

    auto get = [&](int x, int type) -> int {
        return x * 2 - type;
    };

    const int N = 509;
    std::vector<std::pair<int, int>> edges;

    for (int i = 2; i <= N; ++i) {
        for (int j = 1; j < i; ++j) {
            edges.emplace_back(get(i, 0), get(j, 1));
            edges.emplace_back(get(i, 1), get(j, 0));
        }
    }

    std::cout << N * 2 << ' ' << edges.size() << N << '\n';
    for (int i = 1; i <= N; ++i) {
        std::cout << "1 2 ";
    }
    std::cout << '\n';
    for (auto [x, y] : edges) {
        std::cout << x << ' ' << y << '\n';
    }

}

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

    int k;
    std::cin >> k;

    solve();
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 15ms
memory: 5128kb

input:

1

output:

1018 258572509
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 Integer parameter [name=m] equals to 258572509, violates the range [0, 517653]