Submission #306777

# Submission time Handle Problem Language Result Execution time Memory
306777 2020-09-26T09:12:29 Z VEGAnn Stations (IOI20_stations) C++14
0 / 100
837 ms 1024 KB
#include "stations.h"
#include <bits/stdc++.h>
#define PB push_back
#define sz(x) ((int)x.size())
using namespace std;
vector<int> g[1000];
int tin[1000], tout[1000], tt = 0;

void dfs(int v, int p){
    tin[v] = tt++;

    for (int u : g[v]){
        if (u == p) continue;
        dfs(u, v);
    }

    tout[v] = tt - 1;
}

std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) {
    vector<int> labels;

    labels.resize(n);

    for (int i = 0; i < n; i++) {
        labels[i] = i;
    }

	return labels;
}

int find_next_station(int s, int t, std::vector<int> c) {
    int cur = t;

    while (cur > 0){
        for (int v : c)
            if (v == cur)
                return v;
        cur /= 2;
    }

    return s / 2;
}
# Verdict Execution time Memory Grader output
1 Incorrect 528 ms 984 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 466 ms 1024 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 561 ms 856 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 837 ms 768 KB Output is correct
2 Incorrect 698 ms 800 KB Wrong query response.
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 545 ms 856 KB Wrong query response.
2 Halted 0 ms 0 KB -