# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
604573 | Tigryonochekk | Stations (IOI20_stations) | C++17 | 911 ms | 568 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include "stations.h"
#include <vector>
#define ll long long
using namespace std;
const int N = 1002;
vector<int> labels;
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
labels.resize(n);
for (int i = 0; i < n; i++) {
labels[i] = i;
}
return labels;
}
int find_next_station(int s, int t, vector<int> c) {
if (c.size() == 1)
return c[0];
s++;
t++;
for (int i = 0; i < c.size(); i++) {
c[i]++;
}
while (t > s) {
for (int x : c) {
if (t == x)
return x - 1;
}
t /= 2;
}
return c[0] - 1;
}
/*
1
5 5
4 2
3 1
0 2
0 3
5
4 0 2
2 4 4
3 4 0
0 1 3
0 3 3
1
7 7
0 1
0 2
1 3
1 4
2 5
2 6
4
0 4 1
1 4 4
1 5 0
3 5 1
*/
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |