# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
586711 | John3_141592 | Stations (IOI20_stations) | C++14 | 799 ms | 556 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "stations.h"
#include <vector>
#include <bits/stdc++.h>
using namespace std;
std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) {
int rep[10006];
fill(rep,rep+1009,0);
bool band=false;
for(int i=0;i<n;i++){
rep[u[i]]++;
rep[v[i]]++;
if(rep[u[i]]>2 || rep[v[i]]) band=true;
}
if(!band){
vector <int> vec;
for(int i=0;i<n;i++) vec.push_back(i);
return vec;
}
}
int find_next_station(int s, int t, std::vector<int> c) {
if(t>s) return max(c[0],c[1]);
else return min(c[0],c[1]);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |