# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
241757 | 2020-06-25T12:37:08 Z | valerikk | Xoractive (IZhO19_xoractive) | C++14 | 0 ms | 0 KB |
#include<bits/stdc++.h> using namespace std; /* mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count()); int inter_n; int inter_arr[10]; int ask(int i) { return inter_arr[i]; } int* get_pairwise_xor(int* pos) { int k = sizeof(pos) / 4; int* res = new int[k * k]; for (int i = 0; i < k; i++) { for (int j = 0; j < k; j++) res[i * k + j] = inter_arr[pos[i]] ^ inter_arr[pos[j]]; } sort(res, res + k * k); return res; } */ int* guess(int n) { int* res = new int[n]; for (int i = 0; i < n; i++) res[i] = ask(i); return res; } /* void gen() { inter_n = rnd() % 9 + 2; vector<bool> used(32, 0); for (int i = 0; i < inter_n; i++) { int num = rnd() % 32; while (used[num]) num = rnd() % 32; used[num] = 1; inter_arr[i] = num; } } bool check() { int* ans = guess(inter_n); for (int i = 0; i < inter_n; i++) { if (ans[i] != inter_arr[i]) return 0; } return 1; } */ /* int main() { //ios::sync_with_stdio(false); //cin.tie(0); int t; cin >> t; while (t--) { gen(); if (!check()) { cout << inter_n << '\n'; for (int i = 0; i < inter_n; i++) cout << inter_arr[i] << " "; cout << '\n'; return 0; } } return 0; } */