QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#294193 | #4829. Mark on a Graph | ucup-team896# | 0 | 1ms | 3592kb | C++14 | 1.4kb | 2023-12-30 09:43:49 | 2023-12-30 09:43:50 |
answer
#include <bits/stdc++.h>
#ifdef dbg
#define D(...) fprintf(stderr, __VA_ARGS__)
#define DD(...) D("[Debug] "#__VA_ARGS__ " = "), \
debug_helper::debug(__VA_ARGS__), D("\n")
#include "C:\Users\wsyear\Desktop\OI\templates\debug.hpp"
#else
#define D(...) ((void)0)
#define DD(...) ((void)0)
#endif
#define rep(i, j, k) for (int i = (j); i <= (k); ++i)
#define per(i, j, k) for (int i = (j); i >= (k); --i)
#define SZ(v) int((v).size())
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
using ll = long long;
using pii = std::pair<int, int>;
using pll = std::pair<ll, ll>;
template<class T> void chkmn(T &x, T y) { if (y < x) x = y; }
template<class T> void chkmx(T &x, T y) { if (y > x) x = y; }
using namespace std;
const int maxn = 10010;
int n, m, deg[maxn], a[] = {0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0};
int main() {
// freopen("ce", "r", stdin);
cin.tie(nullptr) -> ios::sync_with_stdio(false);
cin >> n >> m;
rep (i, 1, m) {
int u, v;
cin >> u >> v;
deg[u]++, deg[v]++;
}
vector<int> cg;
rep (i, 1, 9) if ((a[i] ^ deg[i]) & 1) cg.emplace_back(i);
if (!SZ(cg)) return cout << "ok\n", 0;
cout << "mark\n";
if (SZ(cg) & 1) cg.emplace_back(11);
assert(SZ(cg) / 2 <= 5);
cout << SZ(cg) / 2 << '\n';
rep (i, 0, SZ(cg) / 2 - 1) cout << cg[2 * i] << " " << cg[2 * i + 1] << '\n';
}
详细
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3592kb
input:
1000 3560 603 151 415 20 102 569 895 552 678 734 24 614 689 518 440 223 751 919 223 433 711 551 502 634 706 583 812 501 514 535 780 751 720 530 532 384 888 139 864 791 292 675 171 881 30 592 464 557 280 299 654 650 894 335 250 532 792 10 83 969 118 771 579 300 852 983 243 940 957 939 817 889 911 319...
output:
mark 2 1 2 4 6
input:
1000 3562 184 652 396 222 116 662 330 865 163 684 495 833 681 118 781 1000 184 255 844 383 831 639 48 932 279 904 167 379 278 494 484 763 66 4 209 500 64 422 134 784 663 368 405 669 292 133 583 66 999 200 125 457 806 567 777 437 841 125 463 747 898 339 721 655 102 790 267 793 201 155 186 576 937 761...
output:
mark 1 8 9
result:
wrong answer Token "mark" doesn't correspond to pattern "ok"