Submission #305153

#TimeUsernameProblemLanguageResultExecution timeMemory
305153ScarletSStations (IOI20_stations)C++17
8 / 100
1055 ms896 KiB
#include "stations.h" #include <bits/stdc++.h> using namespace std; bool can_contract(int x, int y) { for (int i=0;i<13;++i) { if (x==y) return 1; y/=2; } return 0; } 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; } return labels; } int find_next_station(int s, int t, std::vector<int> c) { if (can_contract(2*(s+1),t+1)) return 2*(s+1)-1; if (can_contract(2*(s+1)+1,t+1)) return 2*(s+1); return (s-1)/2; }
#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...