제출 #620582

#제출 시각아이디문제언어결과실행 시간메모리
620582wiwiho기지국 (IOI20_stations)C++14
8 / 100
993 ms572 KiB
#include "stations.h"

#include <bits/stdc++.h>

#define iter(a) a.begin(), a.end()
#define lsort(a) sort(iter(a))
#define gsort(a) sort(iter(a), greater<>())
#define eb emplace_back
#define ef emplace_front
#define pob pop_back()
#define pof pop_front()
#define mp make_pair
#define F first
#define S second
#define uni(a) a.resize(unique(iter(a)) - a.begin())
#define printv(a, b) { \
    for(auto pv : a) b << pv << " "; \
    b << "\n"; \
}

using namespace std;

typedef long long ll;
typedef long double ld;

using pii = pair<int, int>;
using pll = pair<ll, ll>;

template<typename A, typename B>
ostream& operator<<(ostream& o, pair<A, B> p){
    return o << '(' << p.F << ',' << p.S << ')';
}

vector<int> label(int n, int k, vector<int> u, vector<int> v) {

    vector<int> ans(n);
    iota(iter(ans), 0);

    return ans;
}

int find_next_station(int s, int t, vector<int> c) {
    if(c.size() == 1) return c[0];

    int lst = t;
    int tmp = t;
    while(tmp > s){
        tmp = (tmp - 1) / 2;
        if(tmp == s) return lst;
        lst = tmp;
    }
    
    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...