# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
272199 | erray | Easter Eggs (info1cup17_eastereggs) | C++17 | 24 ms | 760 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// author: erray
#include<bits/stdc++.h>
#include"grader.h"
using namespace std;
//int query(vector<int> asd) { return true; }
const int N = 515;
vector<int> g[N], ask;
void dfs(int v, int pr = -1) {
ask.push_back(v);
for (auto u : g[v]) {
if (pr == u) continue;
dfs(u, v);
}
}
int findEgg(int n, vector<pair<int, int>> edges) {
bool ok = true;
for (int i = 0; i < 512; ++i) ok &= g[i].empty();
for (auto e : edges) {
if (ok) {
g[e.first].push_back(e.second);
g[e.second].push_back(e.first);
}
}
dfs(1);
int s = 0, e = n - 1;
while (s != e) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |