Submission #319790

#TimeUsernameProblemLanguageResultExecution timeMemory
319790northlakeStations (IOI20_stations)C++17
8 / 100
986 ms864 KiB
#include<stations.h> #include<bits/stdc++.h> using namespace std; vector<int> label(int n, int k, vector<int> u, vector<int> v) { vector<int> labels = {}; for (int i = 0; i < n; i++) { labels.push_back(i); } return labels; } bool is_child(int a, int b) { if (a == b) return true; if (a > b) return false; return (is_child(2*a + 1, b) || is_child(2*a + 2, b)); } int find_next_station(int s, int t, vector<int> c) { if (!is_child(s, t)) return c[0]; if (is_child(2*s + 1, t)) return (2*s + 1); if (is_child(2*s + 2, t)) return (2*s + 2); }

Compilation message (stderr)

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