Submission #1076590

#TimeUsernameProblemLanguageResultExecution timeMemory
1076590mindiyakStations (IOI20_stations)C++14
0 / 100
516 ms940 KiB
#include "stations.h" #include <vector> #include <queue> 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; } return labels; } int find_next_station(int s, int t, std::vector<int> c) { queue<int> q; q.push(c[1]); while(!q.empty()){ int a = q.front();q.pop(); if(a == t)return c[1]; if(a > t)continue; q.push({2*a+1}); q.push({2*a+2}); } q.push(c[2]); while(!q.empty()){ int a = q.front();q.pop(); if(a == t)return c[2]; if(a > t)continue; q.push({2*a+1}); q.push({2*a+2}); } return c[0]; }
#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...