Submission #202389

#TimeUsernameProblemLanguageResultExecution timeMemory
202389klungsXoractive (IZhO19_xoractive)C++14
6 / 100
5 ms380 KiB
#include "interactive.h" #include <bits/stdc++.h> using namespace std; vector<int> guess(int n) { // vector<int> questions[7], answers[7]; // for (int i = 2; i <= n; i++) { // for (int j = 0; j < 7; j++) if ((1 << j) & i) { // questions[j].push_back(i); // } // } // for (int j = 0; j < 7; j++) { // answers[j] = contains(questions[j]); // } vector <int> ans; map<int, int> cnt; for (int i = 1; i <= n; i++) { int num = ask(i); cnt[num]++; ans.push_back(num); assert(cnt[num] <= 1); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...