Submission #918148

#TimeUsernameProblemLanguageResultExecution timeMemory
918148Sputnik123Easter 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(int node,int par) { e.psuh_back(node); for(int i:adj[node]) { if(i==par) continue; dfs(i,node); } } int findegg(int n,vector<pair<int,int>> bridges) { e.clear(); for(int 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); int l=0,r=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: In function 'void dfs(int, int)':
eastereggs.cpp:8:4: error: 'class std::vector<int>' has no member named 'psuh_back'; did you mean 'push_back'?
    8 |  e.psuh_back(node);
      |    ^~~~~~~~~
      |    push_back