#include "Alice.h"
#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> Alice() {
// #define int int64_t
long long X = setN(77);
vector<pair<int, int>> res;
for (int64_t i = 1; i < 77; i++) {
res.push_back({X%i + 1, i + 1});
}
return res;
}
#include "Bob.h"
#include <bits/stdc++.h>
using namespace std;
// int gcd_r(__int128_t a, __int128_t b, __int128_t &x, __int128_t &y) {
// if (b == 0) {
// x = 1, y = 0;
// return a;
// }
// __int128_t g = gcd(b, a%b, x, y);
// __int128_t xp = y;
// __int128_t yp = x - y * (a / b);
// x = xp, y = yp;
// return g;
// }
long long Bob(vector<pair<int, int>> v) {
long long ans = 0, d = 1;
for (auto [r, a] : v) {
r--, a--;
while (ans % a != r)
ans += d;
d *= a / __gcd((int64_t)a, (int64_t)d);
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |