Submission #432886

#TimeUsernameProblemLanguageResultExecution timeMemory
432886lior5654Stations (IOI20_stations)C++17
0 / 100
3056 ms588 KiB
#include <bits/stdc++.h>

using namespace std;


typedef long long int ll;
typedef pair<ll, ll> pl;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<pl> vpl;
typedef vector<vpl> vvpl;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pi> vpi;
typedef vector<vpi> vvpi;

#define rep(i, n) for(int i = 0; i < n; ++i)
#define all(c) (c.begin()), (c.end())
#define pb push_back
#define eb emplace_back
#define fi first
#define se second


#include "stations.h"


const int maxn = 1e3 + 5;

vi g[maxn];


std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) {
    vi res(n);
    rep(i, n) {
        res[i] = i;
    }
    return res;
}

int find_next_station(int s, int t, std::vector<int> c) {
    while(t) {
        for(auto e : c) {
            if(e == t) return e;
        }
        t = (t - 1) / 2;
    }
    *min_element(all(c));

}

Compilation message (stderr)

stations.cpp: In function 'int find_next_station(int, int, std::vector<int>)':
stations.cpp:49:17: warning: control reaches end of non-void function [-Wreturn-type]
   49 |     *min_element(all(c));
      |      ~~~~~~~~~~~^~~~~~~~
#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...