# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
309424 | georgerapeanu | Stations (IOI20_stations) | C++17 | 1085 ms | 1280 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 <algorithm>
#include <map>
using namespace std;
vector<int> graph[1005];
int lst;
void dfs(int nod,int tata,int lvl,vector<int> &labels){
lst++;
if(lvl == 0){
labels[nod] = lst;
}
for(auto it:graph[nod]){
if(it == tata){
continue;
}
dfs(it,nod,lvl ^ 1,labels);
}
if(lvl == 1){
labels[nod] = lst;
}
lst++;
}
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
for(int i = 0;i < n;i++){
graph[i].clear();
# | 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... |