Submission #1205301

#TimeUsernameProblemLanguageResultExecution timeMemory
1205301notmeStations (IOI20_stations)C++20
0 / 100
306 ms492 KiB
#include "stations.h" #include <bits/stdc++.h> #define pb push_back using namespace std; const int maxn = 2e3 + 10; vector < int > g[maxn]; int degree[maxn]; int depth[maxn], used[maxn]; void dfs(int beg, int h) { used[beg]= 1; depth[beg] = h; for (auto nb: g[beg]) { if(used[nb])continue; dfs(nb, h+1); } } 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) { map < int, int > mp; for(auto x: c) mp[x] = 1; while(t) { if(mp[t])return t; t /= 2; } return s/2; } /** 2 7 10000000 0 1 0 2 0 6 2 3 2 4 3 5 4 6 3 0 4 1 2 3 4 2 4 3 2 7 10000000 0 1 0 2 0 6 2 3 2 4 3 5 4 6 3 0 1 3 0 3 4 2 4 3 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...