# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
699794 | Zybg | Easter Eggs (info1cup17_eastereggs) | C++11 | 245 ms | 131072 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
vector<int> gr[520], order;
void dfs(int u,int pre){
order.push_back(u);
for(int i : gr[u]){
if(i == pre) continue;
dfs(i,u);
}
}
int findEgg (int N, vector < pair < int, int > > bridges)
{
for(auto pii : bridges){
gr[pii.first].push_back(pii.second);
gr[pii.second].push_back(pii.first);
}
dfs(1,0);
int l = 0, r = N-1;
while(l < r){
int mid = l+r+1 >> 1;
if(query(vector<int>(order.begin(),order.begin()+mid))) r = mid-1;
else l = mid;
}
return order[l];
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |