# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
933604 | vjudge1 | Speedrun (RMI21_speedrun) | C++14 | 1 ms | 740 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 <speedrun.h>
using namespace std;
void assignHints (int subtask , int N, int A[], int B[])
{
setHintLen(N-1);
vector<vector<int>>adj(N);
for (int i = 0; i < N; i++)
{
adj[A[i]].push_back(B[i]);
adj[B[i]].push_back(A[i]);
}
for (int i = 0; i < N; i++)
{
if (adj[A[i]].size() == 1)
setHint(i, 0, 0);
else continue;
}
}
void speedrun(int subtask , int N, int start )
{
bool yo = getHint(0);
int jefe;
if (yo)
{
for (int i = 0; i < N; i++)
{
if (i == start) continue;
if (!goTo(i)) continue;
jefe = i; break;
}
}
for (int i = 0; i < N; i++)
{
if (i == jefe) continue;
goTo(i);
goTo(jefe);
}
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |