Submission #525111

# Submission time Handle Problem Language Result Execution time Memory
525111 2022-02-10T17:37:25 Z dron_rp Easter Eggs (info1cup17_eastereggs) C++14
16 / 100
2 ms 456 KB
#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;
}
# Verdict Execution time Memory 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
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 456 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 432 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -