# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
432680 | 2021-06-18T12:21:13 Z | Ruba_K | Stations (IOI20_stations) | C++14 | 3000 ms | 2097156 KB |
#include "stations.h" #include <vector> #include<bits/stdc++.h> using namespace std ; int zft ; const int N = 1e3 + 3 ; vector<int> labels; vector<int> adj[N]; void zftquestion(int u , int p ){ labels[u] = ++zft ; for(auto f : adj[u]){ if(f != p) zftquestion(f , u); } } vector<int> label(int n, int k, vector<int> u, vector<int> v) { labels.resize(n); for(int i = 0 ; i < n - 1 ; i ++) adj[u[i]].push_back(v[i]) , adj[v[i]].push_back(u[i]); int st = 0; for(int i = 0 ; i < n ; i ++) if(adj[i].size() == 1)st = i ; zftquestion(st , -1); return labels; } int find_next_station(int s, int t,vector<int> c) { if(c.size() == 1)return c[0]; if(s < t)return c[1]; return c[0]; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1349 ms | 2097156 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3035 ms | 504 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1623 ms | 2097156 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 930 ms | 400 KB | Output is correct |
2 | Runtime error | 1177 ms | 2097156 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2863 ms | 2097156 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |