#include <vector>
#include <cassert>
#include <algorithm>
#include "grader.h"
using namespace std;
int findEgg(int N, vector < pair < int, int > > bridges);
int query(vector < int > islands);
int findEgg(int n, vector<pair<int,int>>bridges){
assert(n<=16);
vector<int>v;
for(int i=1; i<=n; i++){
v.push_back(i);
}
random_shuffle(v.begin(), v.end());
for(int i=0; i<n; i++){
if(query({v[i]}))
return v[i];
}
return -1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
248 KB |
Number of queries: 16 |
2 |
Incorrect |
4 ms |
436 KB |
Number of queries: 16 |
3 |
Incorrect |
3 ms |
436 KB |
Number of queries: 14 |
4 |
Incorrect |
2 ms |
436 KB |
Number of queries: 16 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
2 ms |
540 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
664 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |