| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1367066 | serendipitous | Strange Device (APIO19_strange_device) | C++20 | 5094 ms | 589824 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
map<pair<ll, ll>, bool> store;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n, a, b; cin >> n >> a >> b;
ll ans = 0;
for(int i = 0; i < n; ++i) {
ll x1, y1; cin >> x1 >> y1;
for(ll x = x1; x <= y1; ++x) {
bool &exists = store[{(x + (x/b)) % a, (x % b)}];
if(!exists) {
++ans;
exists = true;
}
}
}
cout << ans;
}| # | 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... | ||||
