Submission #243052

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2430522020-06-30 08:21:09XenocryptixEaster Eggs (info1cup17_eastereggs)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#include "grader.h"
using namespace std;
#define fi first
#define se second
#define pb push_back
vector<int> g[10000], q;
void dfs(int u, int f = -1) {
q.pb(u);
for(int i: g[u])
if(i != f)
dfs(i, u)
}
int bin_search(int l, int r) {
while(l < r) {
m = (l + r) >> 1;
if(query(vector<int>(q.begin(), q.begin() + m)))
r = m;
else
l = m + 1;
}
return l;
}
int findEgg(int N, vector< pair<int, int> > bridges) {
for(auto i: bridges) {
g[i.fi].pb(i.se);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

eastereggs.cpp: In function 'void dfs(int, int)':
eastereggs.cpp:15:1: error: expected ';' before '}' token
 }
 ^
eastereggs.cpp: In function 'int bin_search(int, int)':
eastereggs.cpp:19:3: error: 'm' was not declared in this scope
   m = (l + r) >> 1;
   ^