Submission #6378116


Source Code Expand

Copy
#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <set>
#include <utility>
#include <cstdlib>
#include <queue>
#include <stack>
#include <iomanip>
#include <cstdio>
#include <map>
#include <list>

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P;

#define _upgrade ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define rep(i,x) for(ll i = 0; i < (ll)(x); i++)
#define all(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
#define pb push_back

template<class T1, class T2> void chmin(T1 &a, T2 b){if(a>b)a=b;}
template<class T1, class T2> void chmax(T1 &a, T2 b){if(a<b)a=b;}

//ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
//ll lcm(ll x, ll y) {return x / gcd(x, y) * y;}

int dx[4] = {1,0,-1,0};
int dy[4] = {0,1,0,-1};

const ll MOD = 1e9 + 7;
const ll INF = 1e9;
const long double PI = 3.14159265358979323846;


// ****************************************CODE***************************************//










int main(){





    int n;
    cin >> n;

    int ans = 1;
    for(int i = 2; i <= n; i++){
        ans ^= i;
    }

    for(int i = 1; i <= n; i++){
        ans ^= i-1;
        ans ^= i;
        if(ans != i){
            cout << "No" << endl;
            cout << -1 << endl;
            return 0;
        }
    }

    cout << "Yes" << endl;
    for(int i = 2; i <= 2*n; i++){
        cout << i-1 << " " << i << endl;
    }

    return 0;










}



























Submission Info

Submission Time
Task C - Skolem XOR Tree
User yuyargon
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1656 Byte
Status WA
Exec Time 326 ms
Memory 2816 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 700
Status
AC × 1
WA × 1
AC × 4
WA × 33
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 WA 1 ms 256 KB
hand_02.txt WA 1 ms 256 KB
hand_03.txt AC 1 ms 256 KB
hand_04.txt WA 1 ms 256 KB
hand_05.txt WA 1 ms 256 KB
hand_06.txt AC 1 ms 256 KB
hand_07.txt WA 1 ms 256 KB
sample_01.txt AC 1 ms 256 KB
sample_02.txt WA 1 ms 256 KB
test_01.txt WA 1 ms 256 KB
test_02.txt WA 1 ms 256 KB
test_03.txt WA 1 ms 256 KB
test_04.txt WA 1 ms 256 KB
test_05.txt WA 1 ms 256 KB
test_06.txt WA 1 ms 256 KB
test_07.txt WA 1 ms 256 KB
test_08.txt WA 1 ms 256 KB
test_09.txt WA 1 ms 256 KB
test_10.txt WA 1 ms 256 KB
test_11.txt WA 1 ms 256 KB
test_12.txt WA 1 ms 256 KB
test_13.txt WA 1 ms 256 KB
test_14.txt WA 1 ms 256 KB
test_15.txt WA 1 ms 256 KB
test_16.txt WA 1 ms 256 KB
test_17.txt WA 1 ms 256 KB
test_18.txt AC 326 ms 2816 KB
test_19.txt WA 1 ms 256 KB
test_20.txt WA 1 ms 256 KB
test_21.txt WA 1 ms 256 KB
test_22.txt WA 1 ms 256 KB
test_23.txt WA 1 ms 256 KB
test_24.txt WA 1 ms 256 KB
test_25.txt WA 1 ms 256 KB
test_26.txt WA 1 ms 256 KB
test_27.txt WA 1 ms 256 KB
test_28.txt WA 1 ms 256 KB