Submission #1145794

#TimeUsernameProblemLanguageResultExecution timeMemory
1145794staskoEaster Eggs (info1cup17_eastereggs)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; int findEgg (int N, vector < pair < int, int > > bridges) { for(int i=0; i<N-1; i++) { if(query(i)==1) return i; } return N; }

Compilation message (stderr)

eastereggs.cpp: In function 'int findEgg(int, std::vector<std::pair<int, int> >)':
eastereggs.cpp:10:18: error: could not convert 'i' from 'int' to 'std::vector<int>'
   10 |         if(query(i)==1) return i;
      |                  ^
      |                  |
      |                  int