# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
618703 | Je_O | Xoractive (IZhO19_xoractive) | C++17 | 5 ms | 424 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "interactive.h"
#include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const int N = 105;
map<int, int> pos;
map<int, int> cnt;
vector<int> guess(int n){
vector<int> ans;
for(int i = 0; i < n; ++i)ans.pb(0);
ans[0] = ask(1);
for(int i = 0; i <= 6; i++){
vector<int> v;
for(int j = 2; j <= n; ++j){
if(j & (1 << i))v.pb(j);
}
vector<int> v1 = get_pairwise_xor(v);
v.pb(1);
vector<int> v2 = get_pairwise_xor(v);
cnt.clear();
for(int j = 0; j < v1.size(); ++j)cnt[v1[j]]--;
for(int j = 0; j < v2.size(); ++j)cnt[v2[j]]++;
for(auto it = cnt.begin(); it != cnt.end(); ++it){
if(it->se == 0 || it->fi == 0)continue;
pos[(it->fi) ^ ans[0]] |= (1 << i);
}
}
for(auto it = pos.begin(); it != pos.end(); ++it){
ans[it->se - 1] = it->fi;
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |