Submission #1052499

#TimeUsernameProblemLanguageResultExecution timeMemory
1052499MercubytheFirstStations (IOI20_stations)C++17
8 / 100
448 ms772 KiB
#include "stations.h" #include <vector> #include <bits/stdc++.h> namespace label_call { using std::vector; using std::cout; using std::max; using std::endl; vector<int> ans; } // namespace label_call std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) { using namespace label_call; ans.assign(n, -1); iota(ans.begin(), ans.end(), 1); return ans; } namespace query_call { using std::vector; using std::cout; using std::sort; using std::endl; } int find_next_station(signed s, signed t, std::vector<signed> c) { using namespace query_call; if(t < s) { return s/2; } int tcpy = t; while(tcpy > s) { tcpy /= 2; } if(tcpy != s) { return s/2; } tcpy = t; while(tcpy / 2 > s) { tcpy /= 2; } return tcpy; } /* 1 5 20 0 1 1 2 1 3 2 4 6 0 3 1 3 2 1 3 4 1 1 4 2 0 1 1 1 14 60 0 1 1 2 2 3 2 4 2 5 5 6 5 7 1 8 0 9 9 10 10 11 11 12 11 13 */
#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...