Submission #958710

#TimeUsernameProblemLanguageResultExecution timeMemory
958710Darren0724Xoractive (IZhO19_xoractive)C++17
Compilation error
0 ms0 KiB
#include "interactive.h" #include "grader.cpp" #include <bits/stdc++.h> using namespace std; vector<int> guess(int n) { vector<int> rec(n); rec[0]=ask(1); map<int,int> ans; for(int i=1;i<=n;i=i<<1){ vector<int> r; for(int j=2;j<=n;j++){ if(j&i)r.push_back(j); } map<int,int> m; auto v1=get_pairwise_xor(r); r.push_back(1); auto v2=get_pairwise_xor(r); for(int j:v2)m[j]++; for(int j:v1)m[j]--; for(auto [a,b]:m){ if(b!=0){ ans[a]|=i; } } } for(auto [a,b]:ans){ if(a==0)continue; rec[b-1]=a^rec[0]; } return rec; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc5vXzke.o: in function `query()':
grader.cpp:(.text+0x440): multiple definition of `query()'; /tmp/ccOFut1e.o:Xoractive.cpp:(.text+0x610): first defined here
/usr/bin/ld: /tmp/cc5vXzke.o: in function `ask(int)':
grader.cpp:(.text+0x470): multiple definition of `ask(int)'; /tmp/ccOFut1e.o:Xoractive.cpp:(.text+0x640): first defined here
/usr/bin/ld: /tmp/cc5vXzke.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccOFut1e.o:Xoractive.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cc5vXzke.o: in function `get_pairwise_xor(std::vector<int, std::allocator<int> >)':
grader.cpp:(.text+0x4d0): multiple definition of `get_pairwise_xor(std::vector<int, std::allocator<int> >)'; /tmp/ccOFut1e.o:Xoractive.cpp:(.text+0x6a0): first defined here
collect2: error: ld returned 1 exit status