| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1367105 | Nxmkxing | Strange Device (APIO19_strange_device) | C++20 | 5093 ms | 589824 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<long long, long long>;
const int N = 1e6 + 10;
ll n, a, b, l[N], r[N];
int main() {
cin.tie(nullptr)->ios_base::sync_with_stdio(false);
cin >> n >> a >> b;
set<pll> st;
for (int i = 1; i <= n; i++) {
cin >> l[i] >> r[i];
for (ll t = l[i]; t <= r[i]; t++) {
ll first = (t + (t / b)) % a;
ll second = t % b;
st.insert({first, second});
}
}
cout << st.size();
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
