# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
875784 | 2023-11-20T13:36:39 Z | Aiperiii | Easter Eggs (info1cup17_eastereggs) | C++14 | 189 ms | 131072 KB |
#include <bits/stdc++.h> #include "grader.h" using namespace std; vector <int> g[513]; vector <int> tin; void dfs(int v,int p){ tin.push_back(v); for(auto to : g[v]){ if(to!=p)dfs(to,v); } } int findEgg (int N, vector < pair < int, int > > bridges) { for(int i=0;i<bridges.size();i++){ g[bridges[i].first].push_back(bridges[i].second); g[bridges[i].second].push_back(bridges[i].first); } dfs(1,-1); int l=0,r=N-1; while(l<r){ int md=(l+r)/2; vector <int> check; for(int i=0;i<=md;i++)check.push_back(tin[i]); if(query(check))r=md; else l=md+1; } return tin[l]; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 189 ms | 131072 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 124 ms | 131072 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 128 ms | 131072 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |