# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
434828 | 2021-06-21T22:08:02 Z | jairRS | Stations (IOI20_stations) | C++17 | 4 ms | 544 KB |
#include "stations.h" #include <vector> #include <bits/stdc++.h> using namespace std; int curLabel = 0; void dfs(int src, int p, vector<int> & labels, vector<vector<int>> & adj){ labels[src] = curLabel; curLabel++; for(int a : adj[src]){ if(a == p) continue; dfs(a, src, labels, adj); } } std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) { std::vector<int> labels(n); vector<vector<int>> adj(n); for (int i = 0; i < u.size(); i++) { adj[u[i]].push_back(v[i]); adj[v[i]].push_back(u[i]); } curLabel = 0; dfs(0, -1, labels, adj); } int find_next_station(int s, int t, std::vector<int> c) { auto p = upper_bound(c.begin(), c.end(), t) - 1; return *p; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 4 ms | 540 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 4 ms | 536 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 456 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 544 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 520 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |