# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
432794 | 2021-06-18T13:24:38 Z | A_D | Stations (IOI20_stations) | C++14 | 886 ms | 712 KB |
#include "stations.h" #include <bits/stdc++.h> using namespace std; vector<int> ret; vector<vector<int>> g; int timer; void dfs(int u,int p) { ret.push_back(timer++); for(auto x:g[u]){ if(x==p)continue; dfs(x,u); } } vector<int> label(int n, int k,vector<int> u,vector<int> v){ timer=0; g.clear(); ret.clear(); g.resize(n); for(int i=0;i<u.size();i++){ g[u[i]].push_back(v[i]); g[v[i]].push_back(u[i]); } for(int i=0;i<n;i++){ if(g[i].size()==1){ dfs(i,i); break; } } return ret; } int find_next_station(int s, int t,vector<int> c){ int mx=0,mn=1e9; for(auto x:c){ mn=min(mn,x); mx=max(mx,x); } if(s<t)return mx; else return mn; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 519 ms | 672 KB | Wrong query response. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 468 ms | 476 KB | Wrong query response. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 496 ms | 656 KB | Wrong query response. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 886 ms | 400 KB | Output is correct |
2 | Incorrect | 645 ms | 400 KB | Wrong query response. |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 527 ms | 712 KB | Wrong query response. |
2 | Halted | 0 ms | 0 KB | - |