Submission #1145843

#TimeUsernameProblemLanguageResultExecution timeMemory
1145843mitko7Easter 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 = 1; i < n; i++) { bool q = query(i); if(q) return i; } return n; }

Compilation message (stderr)

eastereggs.cpp: In function 'int findEgg(int, std::vector<std::pair<int, int> >)':
eastereggs.cpp:9:24: error: 'n' was not declared in this scope
    9 |     for(int i = 1; i < n; i++) {
      |                        ^
eastereggs.cpp:10:24: error: could not convert 'i' from 'int' to 'std::vector<int>'
   10 |         bool q = query(i);
      |                        ^
      |                        |
      |                        int
eastereggs.cpp:13:12: error: 'n' was not declared in this scope
   13 |     return n;
      |            ^