| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 618686 | maximath_1 | Xoractive (IZhO19_xoractive) | C++11 | 1 ms | 256 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "interactive.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> guess(int n) {
vector<int> ans(n);
for(int i = 0; i < n; i ++)
ans[i] = ask(i + 1);
vector<int> a2 = ans;
sort(a2.begin(), a2.end());
a2.erase(unique(a2.begin(), a2.end()), a2.end());
assert(a2.size() == n);
return ans;
ans[0] = ask(1);
map<int, int> li;
for(int lg = 0; lg <= 6; lg ++){
vector<int> v;
for(int j = 2; j <= n; j ++){
if(j & (1 << lg)) v.push_back(j);
}
if(v.empty()) continue;
vector<int> gtv = get_pairwise_xor(v);
v.push_back(1);
vector<int> gtvp = get_pairwise_xor(v);
map<int, int> mp;
for(int i : gtv) if(i) mp[i] --;
for(int i : gtvp) if(i) mp[i] ++;
for(auto i : mp){
int cr = (i.first ^ ans[0]);
li[cr] |= (1 << lg);
}
}
for(auto i : li){
ans[i.second - 1] = i.first;
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
