# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
579496 | gun_gan | Strange Device (APIO19_strange_device) | C++17 | 777 ms | 127152 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;
int main()
{
cin.tie(0) -> ios_base::sync_with_stdio(0);
ll n, a, b;
cin >> n >> a >> b;
if(a > 1e18 / b)
{
ll sum = 0;
for(int i = 0; i < n; i++)
{
ll l, r;
cin >> l >> r;
sum += r - l + 1;
}
cout << sum;
}
else
{
ll g = a * b / gcd(a, b + 1);
map<ll, vector<ll>> M;
for(int i = 0; i < n; i++)
{
# | 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... |