#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
int findEgg (int N, vector <pair<int,int>> bridges)
{
if (query({bridges[0].first, bridges[0].second}) == 1){
if (query({bridges[0].first}) == 1){
return bridges[0].first;
} else{
return bridges[0].second;
}
} else{
for (int i = 1; i<=N-1; i++){
if (i == bridges[0].first || i == bridges[0].second) continue;
if (query({i}) == 1){
return i;
}
}
}
return N;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
2 ms |
248 KB |
Number of queries: 14 |
2 |
Partially correct |
1 ms |
200 KB |
Number of queries: 14 |
3 |
Partially correct |
2 ms |
200 KB |
Number of queries: 14 |
4 |
Partially correct |
1 ms |
200 KB |
Number of queries: 14 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
432 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |