Submission #498666

# Submission time Handle Problem Language Result Execution time Memory
498666 2021-12-26T04:58:17 Z model_code Speedrun (RMI21_speedrun) C++17
21 / 100
56 ms 784 KB
// speedrun_brute_tinca.cpp
#include <bits/stdc++.h>
#include "speedrun.h"

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

void dfs(int node, int l, int father = 0) {
  for (int i = 1; i <= l; ++i) {
    if (i != father && getHint(i)) {
      goTo(i);
      dfs(i, l, node);
      goTo(node);
    }
  }
}

void speedrun(int subtask, int N, int start) {
  dfs(start, getLength());
}

# Verdict Execution time Memory Grader output
1 Correct 44 ms 764 KB Output is correct
2 Correct 56 ms 776 KB Output is correct
3 Correct 54 ms 772 KB Output is correct
4 Correct 38 ms 784 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 328 KB The length is too large
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 328 KB The length is too large
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 328 KB The length is too large
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 388 KB The length is too large
2 Halted 0 ms 0 KB -