Submission #933615

# Submission time Handle Problem Language Result Execution time Memory
933615 2024-02-26T01:26:04 Z vjudge1 Speedrun (RMI21_speedrun) C++17
0 / 100
1 ms 344 KB
#include <bits/stdc++.h>
#include "speedrun.h"
using namespace std;
using ll = long long;
using vll = vector <ll>;

void assignHints (int subtask, int n, int u[], int v[]) {
    setHintLen(n);
    for (int i = 0; i < n-1; i++) {
        setHint(u[i], v[i]-1, true);
        setHint(v[i], u[i]-1, true);
    }
    return;
}

static void dfs (int u, int par, int n) {
    for (int v = 1; v <= n; v++) {
        if (v == u) continue;
        if (v == par) continue;
        if (getHint(v-1)) {
            goTo(v);
            dfs(v, u, n);
            goTo(u);
        }
    }
    return;
};

void speedrun (int subtask, int n, int at) {
    dfs(at, at, n);
    return;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Invalid node index for setHint
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB The length is too large
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB The length is too large
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB The length is too large
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB The length is too large
2 Halted 0 ms 0 KB -