답안 #339572

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
339572 2020-12-25T16:19:29 Z fixikmila Xoractive (IZhO19_xoractive) C++14
6 / 100
1 ms 364 KB
#include <bits/stdc++.h>
#include<interactive.h>
using namespace std;
#define MOD 1000000007
typedef long long ll;
typedef pair<ll,ll>pll;
typedef long double ld;
ll bin_pow(ll a,ll b){
    if(b==0)return 1;
    if(b%2==0){
        ll t=bin_pow(a,b/2);
        return t*t%MOD;
    }
    else return a*bin_pow(a,b-1)%MOD;
}

vector<int> guess(int n){
    vector<int>a(n);
    for(int i=0;i<=n-2;i+=2){
        int x=ask(i+1);
        vector<int>c,y;
        c.push_back(i+1);
        c.push_back(i+2);
        //с.push_back(i+3);
        y=get_pairwise_xor(c);
        int z=y.back()^x;
        a[i]=x;
        a[i+1]=z;
    }
    if(n%2==1){
        int x=ask(n);
        a[n-1]=x;
    }
    return a;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -