답안 #524230

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
524230 2022-02-08T20:24:24 Z CSQ31 Easter Eggs (info1cup17_eastereggs) C++17
0 / 100
222 ms 131076 KB
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;

vector<int>adj[1000],a;
void dfs(int v,int u){
	a.push_back(v);
	for(int x:adj[v]){
		if(x==u)continue;
		dfs(x,v);
	}
}
int findEgg (int n, vector < pair < int, int > > bridges)
{
	for(auto x:bridges){
		adj[x.first].push_back(x.second);
		adj[x.second].push_back(x.first);
	}
	dfs(1,0);
	return 1;
	int l = 0,r = n-1;
	while(r>=l){
		int mid = (l+r)/2;
		vector<int>b;
		for(int i=0;i<=mid;i++)b.push_back(a[i]);
		if(query(b))r=mid-1;
		else l=mid+1;
	}
	return a[l];
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 2 ms 964 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 222 ms 131076 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 193 ms 131076 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -