Submission #857696

# Submission time Handle Problem Language Result Execution time Memory
857696 2023-10-06T15:41:01 Z Vanio Speedrun (RMI21_speedrun) C++17
0 / 100
26 ms 1624 KB
#include<bits/stdc++.h>
#include "speedrun.h"
using namespace std;

void assignHints(int st, int n, int a[], int b[]){
    int i;
    setHintLen(n);
    for(i=1;i<n;i++){
        setHint(a[i],b[i],1);
        setHint(b[i],a[i],1);
    }
}

int n;
bool f[1001];

void rec(int k, int p){
    int i;
    f[k]=1;
    for(i=1;i<n;i++){
        if(getHint(i) && !f[i]){
            goTo(i);
            rec(i,k);
        }
    }
    if(p==0) return;
    goTo(p);
}

void speedrun(int st, int N, int start){
    n=N;
    rec(start,0);
}
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 1624 KB Solution didn't visit every node
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 -
# 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 -