Submission #966959

# Submission time Handle Problem Language Result Execution time Memory
966959 2024-04-20T17:40:45 Z AtabayRajabli Speedrun (RMI21_speedrun) C++17
0 / 100
1 ms 768 KB
#include "speedrun.h"
#include <bits/stdc++.h>

using namespace std;

const int sz = 2005;
int cnt = 0, used[sz];
vector<int> g[sz];

void dfs(int v, int p)
{
    used[v] = 1;
    for(int i : g[v])
    {
        if(!used[i])
        {
            goTo(i);
            dfs(i, v);
        }
    }
    if(p > 0 )
    {
        goTo(p);
    }
}

void assignHints(int subtask, int N, int A[], int B[])
{
    for(int i = 1; i <= N - 1; i++)
    {
        g[A[i]].push_back(B[i]);
        g[B[i]].push_back(A[i]);
    }
    setHintLen(1);
}

void speedrun(int subtask, int N, int start)
{
    dfs(start, -1);
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 764 KB Solution didn't visit every node
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 768 KB Solution didn't visit every node
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 768 KB Solution didn't visit every node
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 768 KB Solution didn't visit every node
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 764 KB Solution didn't visit every node
2 Halted 0 ms 0 KB -