# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
405718 | 2021-05-16T20:20:20 Z | ly20 | Stations (IOI20_stations) | C++17 | 3000 ms | 2097156 KB |
#include "stations.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 1123; int marc[MAXN], t; vector <int> grafo[MAXN]; void dfs(int v, int p) { marc[v] = t; t++; for(int i = 0; i < grafo[v].size(); i++) { int viz = grafo[v][i]; if(viz == p) continue; dfs(viz, v); } } vector<int> label(int n, int k, vector<int> u, vector<int> v) { vector<int> labels; for(int i = 0; i < n; i++) { grafo[u[i]].push_back(v[i]); grafo[v[i]].push_back(u[i]); } dfs(0, 0); for (int i = 0; i < n; i++) { labels.push_back(marc[i]); } return labels; } int find_next_station(int s, int t, vector<int> c) { int rs = -1; for(int i= 0; i < c.size(); i++) { int viz = c[i]; if(viz <= t) rs = max(rs, viz); } return rs; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1888 ms | 2097156 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3056 ms | 2232 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1592 ms | 2097156 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1071 ms | 400 KB | Output is correct |
2 | Runtime error | 1190 ms | 2097156 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1241 ms | 2097156 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |