| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 226207 | zoooma13 | Xoractive (IZhO19_xoractive) | C++14 | 8 ms | 512 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bits/stdc++.h"
#include "interactive.h"
using namespace std;
vector<int> guess(int n){
vector <int> ans(n); ans[0] = ask(1);
map <int ,int> pos;
int lg2 = 31-__builtin_clz(n);
for(int b=0; b<=lg2; b++){
vector <int> ids{1};
for(int i=2; i<=n; i++)
if(i&(1<<b))
ids.push_back(i);
auto vv = get_pairwise_xor(ids);
multiset <int> vals = multiset<int>{vv.begin() ,vv.end()};
ids.erase(ids.begin());
for(int r : get_pairwise_xor(ids))
vals.erase(vals.find(r));
for(int r : vals)
pos[r^ans[0]] |= (1<<b);
}
for(auto&p : pos)
ans[p.second-1] = p.first;
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
