# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
305691 | 2020-09-23T19:44:07 Z | arthurconmy | Stations (IOI20_stations) | C++14 | 2 ms | 768 KB |
#ifndef ARTHUR_LOCAL #include "stations.h" #endif #ifdef ARTHUR_LOCAL #include <bits/stdc++.h> #endif using namespace std; using ll = long long; vector<int> adj[1001]; bool vis[1001]; int curv; int labellist[1001]; void dfs(int v) { vis[v]=1; labellist[v]=curv++; for(auto u:adj[v]) { if(!vis[u]) dfs(u); } } vector<int> label(int n, int k, vector<int> U, vector<int> V) { for(int i=0; i<n; i++) { adj[i].clear(); vis[i]=0; } for(int i=0; i<n-1; i++) { adj[U[i]].push_back(V[i]); adj[V[i]].push_back(U[i]); } for(int i=0; i<n-1; i++) { if(adj[i].size() == 1) { curv=0; dfs(i); break; } } } int find_next_station(int s, int t, vector<int> C) { if(C.size() == 1) return C[0]; if(s < t) { return C[1]; } else { return C[0]; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 632 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 768 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |