| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1293609 | sh1ka | Magic Show (APIO24_show) | C++20 | 0 ms | 0 KiB |
#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) {
while (ans % a != r)
ans += d;
d *= a / __gcd(a, d);
}
return ans;
}
