# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1167728 | unknownproblem | Strange Device (APIO19_strange_device) | C++20 | 345 ms | 64784 KiB |
#include <bits/stdc++.h>
using namespace std;
string toString(__int128 x) {
if(x == 0) return "0";
bool neg = false;
if(x < 0) { neg = true; x = -x; }
string s;
while(x > 0) {
int d = (int)(x % 10);
s.push_back('0' + d);
x /= 10;
}
if(neg) s.push_back('-');
reverse(s.begin(), s.end());
return s;
}
ostream& operator<<(ostream &out, const __int128 &x) {
out << toString(x);
return out;
}
struct Interval {
__int128 l, r; // 0 <= l <= r < T
};
long long gcd_ll(long long a, long long b){
while(b){
# | 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... |