| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 521905 | maks007 | Easter Eggs (info1cup17_eastereggs) | C++14 | 2 ms | 456 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.
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
int findEgg (int N, vector < pair < int, int > > bridges)
{
vector <int> used(N+1);
for(int i = 1; i < bridges.size(); i ++) {
vector <int> q = {bridges[i].first, bridges[i].second};
if(query(q)) {
if(!used[q[0]] and !used[q[1]]) {
vector <int> ff = {q[0]};
vector <int> ss = {q[1]};
if(query(ff)) return q[0];
else return q[1];
}
if(used[q[0]]) return q[1];
else return q[0];
}else {
used[q[0]] = 1;
used[q[1]] = 1;
}
}
int i = 0;
if(used[bridges[i].first]) return bridges[i].second;
else return bridges[i].first;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
