# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
25561 | zigui | 버스 (JOI14_bus) | C++14 | 449 ms | 14652 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MX = 100005;
struct bus{
bus(int dst, int p, int q):dst(dst), p(p), q(q){}
int dst, p, q;
};
vector<bus> G[MX];
vector<pii> T[MX];
int N, M;
int a, b, c, d;
pii get_time(bus c){
int d = c.dst;
if( d == N ) return pii(c.p, c.q);
else{
auto it = lower_bound(T[d].begin(), T[d].end(), pii(c.q, -1e9));
if( it == T[d].end() ) return pii(c.p, 1e9);
else return pii(c.p, it->second);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |