Submission #959454

#TimeUsernameProblemLanguageResultExecution timeMemory
959454ramalzaherEaster Eggs (info1cup17_eastereggs)C++14
6 / 100
1 ms456 KiB
#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] ; map<int,bool> mp ; FOR(i ,N ) { auto [a , b ] = bridges[i]; if(query( { a , b } ) == 1 && (mp[a]==0 || mp[b]==0) ) { if(query( { a } ))return a ; else return b ;} mp[a] =1 ; mp[b] =1 ; } return N; }

Compilation message (stderr)

eastereggs.cpp: In function 'int findEgg(int, std::vector<std::pair<int, int> >)':
eastereggs.cpp:11:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   11 |     auto [a , b ]  = bridges[i];
      |          ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...