Submission #858856

# Submission time Handle Problem Language Result Execution time Memory
858856 2023-10-09T09:29:45 Z teamariaa Speedrun (RMI21_speedrun) C++17
0 / 100
3500 ms 20572 KB
#include <bits/stdc++.h>
#include "speedrun.h"

using namespace std;

#define MAX_N 100000

int n;
bitset <MAX_N + 1> viz;

void assign1(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);
    }
}

void assign2and3()
{

}

void assign4()
{

}

void dfs(int node, int parent)
{
    viz[node] = 1;
    for(int i = 1; i <= n; i ++)
        if(getHint(i))
        {
            goTo(i);
            dfs(i, node);
        }
    goTo(parent);
}

void speedrun1(int N, int root)
{
    n = N;
    dfs(root, root);
}

void assignHints(int subtask, int N, int A[], int B[])
{
    if(subtask == 1)
    {
        assign1(N, A, B);
    }
    return;
}

void speedrun(int subtask, int N, int start)
{
    if(subtask == 1)
    {
        speedrun1(N, start);
    }
}
# Verdict Execution time Memory Grader output
1 Execution timed out 3541 ms 20572 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB setHintLen was never called
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB setHintLen was never called
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB setHintLen was never called
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 500 KB setHintLen was never called
2 Halted 0 ms 0 KB -