Submission #1229067

#TimeUsernameProblemLanguageResultExecution timeMemory
1229067marsasgrgStations (IOI20_stations)C++20
8 / 100
305 ms440 KiB
#include "stations.h" #include <bits/stdc++.h> using namespace std; std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) { vector<int> labels(n); for (int i = 0; i < n; i++) { labels[i] = i; } return labels; } int find_next_station(int s, int t, std::vector<int> c) { s++; t++; const int sLev = static_cast<int>(floor(log2(s))); if (const int tLev = static_cast<int>(floor(log2(t))); sLev < tLev) { //ar t descends from s int tLevCopy = tLev; int tCopy = t; while (tLevCopy > sLev + 1) { tLevCopy--; tCopy = tCopy/2; } if (tCopy/2 == s) { return tCopy - 1; } } return (s/2) - 1; }
#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...