Submission #1145787

#TimeUsernameProblemLanguageResultExecution timeMemory
1145787staskoEaster 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; 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:8:20: error: 'n' was not declared in this scope
    8 |     for(int i=0; i<n; i++)
      |                    ^
eastereggs.cpp:10:12: error: 'query' was not declared in this scope
   10 |         if(query(i)==1) return i;
      |            ^~~~~