Submission #871868

# Submission time Handle Problem Language Result Execution time Memory
871868 2023-11-11T18:17:55 Z Mr_Ph Speedrun (RMI21_speedrun) C++14
0 / 100
9 ms 684 KB
#include "speedrun.h"
#include <bits/stdc++.h>
//#include "grader.cpp"
using namespace std;
int lol,st;
void assignHints(int subtask, int n, int a[], int b[]) { 
    setHintLen(n);
    for(int i=1;i<n;i++)
    {
        setHint(a[i],b[i],1);
        setHint(b[i],a[i],1);
    }
    lol=0;
}
void dfs(int node,int parent)
{
    for(int i=1;i<=lol;i++)
    {
        if(i==parent)continue;
        if(getHint(i))
        {
            goTo(i);
            dfs(i,node);
        }
    }
    if(node!=st)
        goTo(parent);
}
void speedrun(int subtask, int n, int start) { /* your solution here */
    st=start;
    dfs(st,0);
}
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 684 KB Solution didn't visit every node
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 352 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 -