# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
243035 | Joky | Easter Eggs (info1cup17_eastereggs) | C++14 | 35 ms | 432 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
#define mk 513
vector <int> g[mk] ,cur_node, cur_set;
int mx_size;
void dfs(int u ,int p=-1){
if(!mx_size)
return;
cur_set.push_back(u);
if(find(cur_node.begin() ,cur_node.end() ,u) != cur_node.end())
mx_size--;
for(int v : g[u]) if(v != p) dfs(v , u);
}
vector <int> findSet(int sz){
mx_size = sz;
cur_set.clear();
dfs(1);
return cur_set;
}
int findEgg (int N, vector < pair < int, int > > bridges){
cur_node.clear();
for(int i=0; i<=N; i++)
g[i].clear();
for(auto&e : bridges)
g[e.first].push_back(e.second),
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |