#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
380 KB |
Output is correct |
2 |
Correct |
5 ms |
248 KB |
Output is correct |
3 |
Correct |
5 ms |
300 KB |
Output is correct |
4 |
Correct |
4 ms |
256 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
5 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |