Submission #959452

# Submission time Handle Problem Language Result Execution time Memory
959452 2024-04-08T08:41:05 Z ramalzaher Easter Eggs (info1cup17_eastereggs) C++14
6 / 100
1 ms 504 KB
#include <bits/stdc++.h>
#include "grader.h"
#define pb push_back
#define FOR(i , n ) for(int i = 0 ; i < n ;i ++ )
using namespace std;
int findEgg (int N, vector < pair < int, int > > bridges)
{
    vector<int> V[N] ;
    FOR(i ,N ) {
    auto [a , b ]  = bridges[i];
    if(query( { a , b } ) == 1 ) {
        if(query( { a } ))return a ; else return b ;}
    }

    return N;
}

Compilation message

eastereggs.cpp: In function 'int findEgg(int, std::vector<std::pair<int, int> >)':
eastereggs.cpp:10:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   10 |     auto [a , b ]  = bridges[i];
      |          ^
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 344 KB Number of queries: 16
2 Partially correct 1 ms 344 KB Number of queries: 16
3 Partially correct 1 ms 504 KB Number of queries: 16
4 Partially correct 1 ms 344 KB Number of queries: 16
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 440 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 456 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -