Submission #15721911
Source Code Expand
#include <bits/stdc++.h> int n; int main() { scanf("%d", &n); int QAQ = 1; for (; QAQ < n; QAQ <<= 1); if (QAQ == n) return puts("No"), 0; printf("Yes\n%d %d\n", n + 1, n + 3); for (int i = 2; i < n; i += 2) printf("%d %d\n%d %d\n%d %d\n%d %d\n", 1, i, 1, i + 1, i, n + i + 1, n + i, i + 1); if (n % 2 == 0) { for (int i = 2; i <= n; ++i) { int j = n ^ i ^ 1; if (j < n && j > 1) return printf("%d %d\n%d %d\n", i, n, j, n + n), 0; } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Skolem XOR Tree |
User | realSpongeBob |
Language | C++ (GCC 9.2.1) |
Score | 700 |
Code Size | 486 Byte |
Status | AC |
Exec Time | 33 ms |
Memory | 3848 KiB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:6:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] 6 | scanf("%d", &n); | ~~~~~^~~~~~~~~~
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 700 / 700 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, sample_01.txt, sample_02.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
hand_01.txt | AC | 8 ms | 3688 KiB |
hand_02.txt | AC | 2 ms | 3588 KiB |
hand_03.txt | AC | 2 ms | 3584 KiB |
hand_04.txt | AC | 2 ms | 3820 KiB |
hand_05.txt | AC | 2 ms | 3720 KiB |
hand_06.txt | AC | 5 ms | 3820 KiB |
hand_07.txt | AC | 3 ms | 3640 KiB |
sample_01.txt | AC | 2 ms | 3760 KiB |
sample_02.txt | AC | 5 ms | 3540 KiB |
test_01.txt | AC | 3 ms | 3676 KiB |
test_02.txt | AC | 4 ms | 3664 KiB |
test_03.txt | AC | 2 ms | 3636 KiB |
test_04.txt | AC | 2 ms | 3624 KiB |
test_05.txt | AC | 7 ms | 3624 KiB |
test_06.txt | AC | 3 ms | 3652 KiB |
test_07.txt | AC | 2 ms | 3656 KiB |
test_08.txt | AC | 3 ms | 3672 KiB |
test_09.txt | AC | 2 ms | 3772 KiB |
test_10.txt | AC | 2 ms | 3524 KiB |
test_11.txt | AC | 3 ms | 3672 KiB |
test_12.txt | AC | 2 ms | 3636 KiB |
test_13.txt | AC | 2 ms | 3684 KiB |
test_14.txt | AC | 2 ms | 3632 KiB |
test_15.txt | AC | 2 ms | 3512 KiB |
test_16.txt | AC | 2 ms | 3680 KiB |
test_17.txt | AC | 28 ms | 3688 KiB |
test_18.txt | AC | 33 ms | 3632 KiB |
test_19.txt | AC | 31 ms | 3604 KiB |
test_20.txt | AC | 32 ms | 3848 KiB |
test_21.txt | AC | 13 ms | 3764 KiB |
test_22.txt | AC | 8 ms | 3764 KiB |
test_23.txt | AC | 11 ms | 3588 KiB |
test_24.txt | AC | 16 ms | 3584 KiB |
test_25.txt | AC | 13 ms | 3684 KiB |
test_26.txt | AC | 19 ms | 3744 KiB |
test_27.txt | AC | 12 ms | 3764 KiB |
test_28.txt | AC | 21 ms | 3644 KiB |