# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
135477 | Juney | Strange Device (APIO19_strange_device) | C++14 | 687 ms | 18708 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
const ll INF = 1e18;
ll N, A, B, T;
ll sweep(vector<pll> &v) {
ll l = 0, r = -1, ret = 0;
for(auto line : v) {
if(r >= line.first) r = max(r, line.second);
else {
ret += (r - l + 1);
l = line.first, r = line.second;
}
}
return ret + (r - l + 1);
}
int main() {
ios::sync_with_stdio(0); cin.tie(0);
cin >> N >> A >> B;
T = A / __gcd(A, B+1);
if(INF / A + 1 < B) T = INF;
else T *= B, T = min(T, INF);
vector<pll> line;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |