Submission #524228

# Submission time Handle Problem Language Result Execution time Memory
524228 2022-02-08T20:22:29 Z CSQ31 Easter Eggs (info1cup17_eastereggs) C++17
0 / 100
1 ms 456 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);
	}
	return 1;
	dfs(1,0);
	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];
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 200 KB The found island is incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 328 KB The found island is incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 456 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -