QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#538194#8934. Challenge NPCucup-team133#WA 0ms3616kbC++231.7kb2024-08-31 08:44:472024-08-31 08:44:47

Judging History

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

  • [2024-08-31 08:44:47]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3616kb
  • [2024-08-31 08:44:47]
  • 提交

answer

#include <bits/stdc++.h>
#ifdef LOCAL
#include <debug.hpp>
#else
#define debug(...) void(0)
#endif

template <class T> std::istream& operator>>(std::istream& is, std::vector<T>& v) {
    for (auto& e : v) {
        is >> e;
    }
    return is;
}

template <class T> std::ostream& operator<<(std::ostream& os, const std::vector<T>& v) {
    for (std::string_view sep = ""; const auto& e : v) {
        os << std::exchange(sep, " ") << e;
    }
    return os;
}

template <class T, class U = T> bool chmin(T& x, U&& y) {
    return y < x and (x = std::forward<U>(y), true);
}

template <class T, class U = T> bool chmax(T& x, U&& y) {
    return x < y and (x = std::forward<U>(y), true);
}

template <class T> void mkuni(std::vector<T>& v) {
    std::ranges::sort(v);
    auto result = std::ranges::unique(v);
    v.erase(result.begin(), result.end());
}

template <class T> int lwb(const std::vector<T>& v, const T& x) {
    return std::distance(v.begin(), std::ranges::lower_bound(v, x));
}

using ll = long long;

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(15);

    int k;
    cin >> k;
    int n = 2 * (k + 2);
    vector<pair<int, int>> es;
    vector<int> cs(n);
    for (int i = 0; i < n / 2; i++) cs[i] = 1;
    for (int i = n / 2; i < n; i++) cs[i] = 2;
    for (int i = 0; i < n / 2; i++) {
        for (int j = n / 2; j < n; j++) {
            if (j - i != n / 2) {
                es.emplace_back(i, j);
            }
        }
    }
    int m = es.size(), c = 2;

    cout << n << " " << m << " " << c << "\n";
    cout << cs << "\n";
    for (auto [u, v] : es) cout << u + 1 << " " << v + 1 << "\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 6 2
1 1 1 2 2 2
1 5
1 6
2 4
2 6
3 4
3 5

result:

wrong answer The graph is not correct