| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 716486 | 1zaid1 | Strange Device (APIO19_strange_device) | C++17 | 5087 ms | 524288 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;
#define int long long
#define endl '\n'
const signed M = 1e4, MOD = 998244353;
int f[M], l[M];
signed main() {
cin.tie(0)->sync_with_stdio(0);
int n, a, b;
cin >> n >> a >> b;
set<pair<int, int>> st;
for (int i = 0; i < n; i++) {
int l, r;
cin >> l >> r;
for (int t = l; t <= r; t++) st.insert({(t+t/b)%a, t%b});
} cout << st.size() << endl;
return 0;
}
/*
3 3 3
4 4
7 9
17 18
*/| # | 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... | ||||
