| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 843782 | zwezdinv | Xoractive (IZhO19_xoractive) | C++17 | 5 ms | 596 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include"interactive.h"
using namespace std;
#define all(x) x.begin(), x.end()
using ll = long long;
vector<int> guess(int n) {
map<int, int> mp;
int c0 = ask(1);
mp[c0] = 1;
for (int h = 0; h < 7; ++h) {
vector<int> qq;
for (int i = 2; i <= n; ++i) {
if (i >> h & 1) qq.push_back(i);
}
if (qq.empty()) continue;
map<int, int> mp1, mp2;
{
vector<int> vals = get_pairwise_xor(qq);
for (auto i: vals) mp1[i]++;
for (int i = 0; i < qq.size(); ++i) mp1[0]--;
for (auto &[x, y]: mp1) y /= 2;
}
qq.push_back(1);
{
vector<int> vals = get_pairwise_xor(qq);
for (auto i: vals) mp2[i]++;
for (int i = 0; i < qq.size(); ++i) mp2[0]--;
for (auto &[x, y]: mp2) y /= 2;
}
for (auto [x, y]: mp1) mp2[x] -= y;
for (auto [x, y]: mp2) {
if (y) {
mp[x ^ c0] |= 1 << h;
}
}
}
vector<int> ans(n);
for (auto [x, y]: mp) ans[y - 1] = x;
return ans;
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
