# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
67874 | quoriess | Easter Eggs (info1cup17_eastereggs) | C++14 | 74 ms | 696 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;
const int MAXN=520;
typedef pair<int,int> pii;
vector<int> adj[MAXN];
vector<pii> dizi;
void doldur(int node,int parent){
dizi.push_back(pii(parent,node));
for (auto it:adj[node])
{
if(it==parent)continue;
doldur(it,node);
}
}
int findEgg (int N, vector < pair < int, int > > bridges)
{
dizi.clear();
for(int i=1;i<=N;i++){
adj[i].clear();
}
for(int i=0;i<(int)bridges.size();i++){
adj[bridges[i].first].push_back(bridges[i].second);
adj[bridges[i].second].push_back(bridges[i].first);
}
doldur(1,-1);
//cout<<" dizisi\n";
int low=0,high=dizi.size()-1;
int mid=(low+high)/2;
int sol=-1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |