# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
313906 |
2020-10-17T09:17:09 Z |
srvlt |
Stations (IOI20_stations) |
C++14 |
|
3000 ms |
2097156 KB |
#include "stations.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define SZ(x) (int)(x).size()
#define all(x) begin(x), end(x)
const int n0 = 1003;
int d[n0], T;
vector <int> g[n0], ind;
void dfs(int v, int p) {
if (!d[v]) ind[v] = T++;
for (int to : g[v]) {
if (to == p) continue;
d[to] = d[v] ^ 1;
dfs(to, v);
}
if (d[v]) ind[v] = T++;
}
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
ind.resize(n);
for (int i = 0; i < SZ(u); i++)
g[u[i]].pb(v[i]), g[v[i]].pb(u[i]);
dfs(0, 0);
return ind;
}
int find_next_station(int s, int t, vector<int> c) {
for (int i = 0; i < SZ(c) - 1; i++)
if (t >= s && t <= c[i])
return c[i];
return c[SZ(c) - 1];
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
2082 ms |
2097156 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
3059 ms |
408 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1674 ms |
2097156 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
886 ms |
768 KB |
Output is correct |
2 |
Runtime error |
1283 ms |
2097156 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
3033 ms |
2097156 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |