QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#538194 | #8934. Challenge NPC | ucup-team133# | WA | 0ms | 3616kb | C++23 | 1.7kb | 2024-08-31 08:44:47 | 2024-08-31 08:44:47 |
Judging History
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;
}
详细
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