Submission #547311

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5473112022-04-10 10:31:10MonarchuwuEaster Eggs (info1cup17_eastereggs)C++17
Compilation error
0 ms0 KiB
/**
* Problem: info1cup17_eastereggs - Easter Eggs
* Link: https://oj.uz/problem/view/info1cup17_eastereggs
* Tags: Interactive
**/
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
//#include "grader.h"
using namespace std;
typedef pair<int, int> pii;
#define ff first
#define ss second
const int N = 600;
vector<int> g[N], ord;
void dfs(int u, int p) {
ord.push_back(u);
for (int v : g[u])
if (v != p) dfs(v, u);
}
int findEgg(int n, vector<pii> bridges) {
for (int i = 1; i <= n; ++i) g[i].clear();
for (pii e : bridges) {
g[e.ff].push_back(e.ss);
g[e.ss].push_back(e.ff);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

eastereggs.cpp: In function 'int findEgg(int, std::vector<std::pair<int, int> >)':
eastereggs.cpp:36:13: error: 'query' was not declared in this scope
   36 |         if (query(vector<int>(ord.begin(), ord.begin() + m + 1)))
      |             ^~~~~