# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1076947 | PanosPask | Overtaking (IOI23_overtaking) | C++17 | 1901 ms | 161992 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 "overtaking.h"
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
// Represents the segment between 2 consecutive stations
struct Segment {
ll distance;
// bunches[d] = a
// All buses that start after d cannot arrive before a
map<ll, ll> bunches;
ll shift = 0;
ll get_arrival(ll departure, int speed) {
ll arrival = departure + distance * speed;
// Find the last bunch before the current departure time
auto bunch = bunches.lower_bound(departure + shift);
if (bunch != bunches.begin()) {
bunch--;
arrival = max(arrival, bunch->second);
}
return arrival;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |