# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
292193 | Autoratch | Xoractive (IZhO19_xoractive) | C++14 | 4 ms | 512 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "interactive.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 101;
const int K = 7;
int a[N],ba;
vector<int> res[K];
set<int> s[K],all;
map<int,int> ma,mb;
void findans(int id)
{
vector<int> a,b;
b = get_pairwise_xor(res[id]);
res[id].push_back(1);
a = get_pairwise_xor(res[id]);
ma.clear(),mb.clear();
for(int x : a) ma[x]++;
for(int x : b) ma[x]--;
for(auto [x,y] : ma) if(x and y) all.insert(x^ba),s[id].insert(x^ba);
}
vector<int> guess(int n)
{
a[1] = ba = ask(1);
for(int i = 2;i <= n;i++) for(int j = 0;j < K;j++) if(i&(1 << j)) res[j].push_back(i);
for(int i = 0;i < K;i++) if(res[i].size()>0) findans(i);
for(int x : all)
{
int each = 0;
for(int j = 0;j < K;j++) if(s[j].find(x)!=s[j].end()) each^=(1 << j);
a[each] = x;
}
vector<int> tmp;
for(int i = 1;i <= n;i++) tmp.push_back(a[i]);
return tmp;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |