Submission #330352

#TimeUsernameProblemLanguageResultExecution timeMemory
330352marvenleeStations (IOI20_stations)C++14
0 / 100
997 ms868 KiB
#include "stations.h" #include <vector> #include <iostream> #include <math.h> using namespace std; std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) { std::vector<int> labels(n); for(int i=0;i<n;i++){ labels[i]=i+1; } return labels; } int find_next_station(int s, int t, std::vector<int> c) { if(t<s){ int minv=c[0]; for(auto it=c.begin();it!=c.end();it++){ minv=min(minv,*it); } return minv; } else{ while(floor(log2(t))!=floor(log2(s))){ t/=2; } if(t/2!=s) { int minv=c[0]; for(auto it=c.begin();it!=c.end();it++){ minv=min(minv,*it); } return minv; } else{ return t; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...