# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
503656 | 2022-01-08T14:28:34 Z | blue | Speedrun (RMI21_speedrun) | C++17 | 3500 ms | 4168 KB |
#include "speedrun.h" #include <vector> #include <algorithm> using namespace std; using vi = vector<int>; using vvi = vector<vi>; const int maxN = 1'000; void assignHints(int subtask, int N, int A[], int B[]) { setHintLen(N); vvi edg(1+N, vi(1+N, 0)); for(int e = 1; e <= N-1; e++) edg[A[e]][B[e]] = edg[B[e]][A[e]] = 1; for(int u = 1; u <= N; u++) for(int v = 1; v <= N; v++) setHint(u, v, edg[u][v]); } int N; void dfs(int u, int p) { for(int v = 1; v <= N; v++) { if(v == p) continue; if(getHint(v)) { goTo(v); dfs(v, u); goTo(u); } } } void speedrun(int subtask, int N_, int start) { int l = getLength(); N = N_; dfs(start, 0); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3542 ms | 4168 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 200 KB | The length is too large |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 200 KB | The length is too large |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 200 KB | The length is too large |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 200 KB | The length is too large |
2 | Halted | 0 ms | 0 KB | - |