# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
67733 | 2018-08-15T09:19:27 Z | tempytemptemp | Easter Eggs (info1cup17_eastereggs) | C++14 | 3 ms | 704 KB |
#include <vector> #include <cassert> #include <algorithm> #include "grader.h" using namespace std; int findEgg(int N, vector < pair < int, int > > bridges); int query(vector < int > islands); int findEgg(int n, vector<pair<int,int>>bridges){ assert(n<=16); bool pos[n+1]; for(int i=1; i<=n; i++) pos[i]=1; for(int i=0; i<bridges.size(); i++){ if(!pos[bridges[i].first] && !pos[bridges[i].second]) continue; if(!pos[bridges[i].first]){ if(query({bridges[i].second})) return bridges[i].second; else{ pos[bridges[i].second]=0; continue; } } else if(!pos[bridges[i].second]){ if(query({bridges[i].first})) return bridges[i].first; else{ pos[bridges[i].first]=0; continue; } } if(query({bridges[i].first, bridges[i].second})){ if(query({bridges[i].first})) return bridges[i].first; else return bridges[i].second; } else{ pos[bridges[i].first]=pos[bridges[i].second]=0; } } return -1; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 248 KB | Number of queries: 11 |
2 | Incorrect | 3 ms | 308 KB | Number of queries: 11 |
3 | Incorrect | 3 ms | 384 KB | Number of queries: 15 |
4 | Incorrect | 3 ms | 384 KB | Number of queries: 15 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 588 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 704 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |