Submission #918094

#TimeUsernameProblemLanguageResultExecution timeMemory
918094Sputnik123Easter Eggs (info1cup17_eastereggs)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include <bits/stdc++.h> using namespace std; vector <int> e; vector <int> adj[700]; void dfs(ll node,par) { for(ll i:adj[node]) { if(i==par) continue; dfs(i,node); } } int findegg(int n,vector<pair<int,int>> bridges) { e.clear(); for(ll i=0;i<n;i++) adj[i].clear(); for(pair <int,int> p: bridges) { adj[p.first].push_back(p.second); adj[p.second].push_back(p.first); } dfs(1,1); ll l=0,e=e.size()-1; while (l < r) { int mid = (l + r) >> 1; vector<int> nw; for (int i = 0; i <= mid; i++) nw.push_back(e[i]); if (query(nw)) r = mid; else l = mid + 1; } return e[l]; }

Compilation message (stderr)

eastereggs.cpp:6:6: error: variable or field 'dfs' declared void
    6 | void dfs(ll node,par)
      |      ^~~
eastereggs.cpp:6:10: error: 'll' was not declared in this scope
    6 | void dfs(ll node,par)
      |          ^~
eastereggs.cpp:6:18: error: 'par' was not declared in this scope
    6 | void dfs(ll node,par)
      |                  ^~~
eastereggs.cpp: In function 'int findegg(int, std::vector<std::pair<int, int> >)':
eastereggs.cpp:17:9: error: 'll' was not declared in this scope
   17 |     for(ll i=0;i<n;i++)
      |         ^~
eastereggs.cpp:17:16: error: 'i' was not declared in this scope
   17 |     for(ll i=0;i<n;i++)
      |                ^
eastereggs.cpp:24:5: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   24 |     dfs(1,1);
      |     ^~~
      |     ffs
eastereggs.cpp:25:5: error: 'll' was not declared in this scope
   25 |     ll l=0,e=e.size()-1;
      |     ^~
eastereggs.cpp:26:12: error: 'l' was not declared in this scope
   26 |     while (l < r)
      |            ^
eastereggs.cpp:26:16: error: 'r' was not declared in this scope
   26 |     while (l < r)
      |                ^
eastereggs.cpp:34:14: error: 'l' was not declared in this scope
   34 |     return e[l];
      |              ^