# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1175271 | tkm_algorithms | Strange Device (APIO19_strange_device) | C++20 | 313 ms | 16980 KiB |
/**
* In the name of Allah
* We are nothing and you're everything
* author: najmuddin
**/
#include <bits/stdc++.h>
using namespace std;
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
#define int ll
const char nl = '\n';
const int inf = 1e18+1;
int32_t main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, A, B;
cin >> n >> A >> B;
int T = inf;
// A/gcd(A, B+1)*B
if (B <= inf/(A/__gcd(A, B+1)))T = A/__gcd(A, B+1)*B;
vector<pair<int, int>> v;
for (int i = 0; i < n; ++i) {
int l, r; cin >> l >> r;
if (r-l+1 >= T) {
# | 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... |