Submission #933618

# Submission time Handle Problem Language Result Execution time Memory
933618 2024-02-26T01:29:53 Z vjudge1 Speedrun (RMI21_speedrun) C++17
21 / 100
24 ms 1808 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 = 1; i <= n-1; i++) {
        setHint(u[i], v[i], true);
        setHint(v[i], u[i], true);
    }
    return;
}

const 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)) {
            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 Correct 23 ms 1752 KB Output is correct
2 Correct 24 ms 1304 KB Output is correct
3 Correct 23 ms 1612 KB Output is correct
4 Correct 24 ms 1808 KB Output is correct
# 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 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 1 ms 344 KB The length is too large
2 Halted 0 ms 0 KB -