# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
345973 | 2021-01-08T19:44:16 Z | ahmet | Easter Eggs (info1cup17_eastereggs) | C++14 | 2 ms | 492 KB |
#include <bits/stdc++.h> #include "grader.h" using namespace std; #define ref(a,b,c) for(int (a)=(b);(a)<=(c);++(a)) #define rep(a,b) for(int (a)=0;(a)<(b);++(a)) #define ll long long #define pb push_back #define mp make_pair vector <int> v[550]; int findEgg (int N, vector < pair < int, int > > bridges) { for(int i=0;i<N-1;++i){ int x=bridges[i].first; int y=bridges[i].second; v[x].pb(y); v[y].pb(x); } vector <int> vis(550,0); for(int i=1;i<=N;++i){ for(int j=0;j<v[i].size();++j){ int node=v[i][j]; if(vis[node]+vis[i]==2)continue; if(query({i,node})){ if(vis[node])return i; else if(vis[i])return node; else{ if(query({i}))return i; else return node; } } else{ vis[node]=1; vis[i]=1; } } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 2 ms | 364 KB | Number of queries: 13 |
2 | Partially correct | 2 ms | 364 KB | Number of queries: 11 |
3 | Partially correct | 2 ms | 364 KB | Number of queries: 13 |
4 | Partially correct | 2 ms | 364 KB | Number of queries: 15 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 492 KB | Execution killed with signal 6 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 492 KB | Execution killed with signal 6 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |