# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
699320 | doowey | Naan (JOI19_naan) | C++14 | 4096 ms | 148608 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef __int128 ll;
typedef pair<int, int> pii;
#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int N = 2010;
const ll C = (ll)1e18;
struct frac{
ll A;
ll B;
frac operator+ (frac y){
return {A * y.B + B * y.A, B * y.B};
}
frac operator- (frac y){
return {A * y.B - B * y.A, B * y.B};
}
bool operator< (frac y){
if(A/B == y.A/y.B){
return (A * y.B - B * y.A < 0);
}
else{
return A/B < y.A/y.B;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |