Submission #306776

#TimeUsernameProblemLanguageResultExecution timeMemory
306776VEGAnnStations (IOI20_stations)C++14
0 / 100
882 ms1304 KiB
#include "stations.h" #include <bits/stdc++.h> #define PB push_back #define sz(x) ((int)x.size()) using namespace std; vector<int> g[1000]; int tin[1000], tout[1000], tt = 0; void dfs(int v, int p){ tin[v] = tt++; for (int u : g[v]){ if (u == p) continue; dfs(u, v); } tout[v] = tt - 1; } std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) { vector<int> labels; labels.resize(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) { int cur = t; while (cur > 0){ for (int v : c) if (v == cur) return v; cur /= 2; } for (int v : c) if (v < s) return v; }

Compilation message (stderr)

stations.cpp: In function 'int find_next_station(int, int, std::vector<int>)':
stations.cpp:45:1: warning: control reaches end of non-void function [-Wreturn-type]
   45 | }
      | ^
#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...