제출 #1293610

#제출 시각아이디문제언어결과실행 시간메모리
1293610sh1ka마술쇼 (APIO24_show)C++20
0 / 100
1097 ms344 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((int64_t)a, (int64_t)d); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...