# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
762603 | goodbyehanbyeol | Organizing the Best Squad (FXCUP4_squad) | C++17 | 54 ms | 51712 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 "squad.h"
#include <bits/stdc++.h>
#define mabs(x) ((x)>0?(x):(-x))
using namespace std;
typedef __int128 ll;
struct Frac{
ll a, b;
Frac(){}
Frac(ll x){
a=x, b=1;
}
Frac(ll _a, ll _b){
a = _a, b = _b;
if(b<0) a=-a,b=-b;
ll g = __gcd(a, b);
a /= g, b /= g;
}
Frac operator+(const Frac &r)const{
return Frac(a*r.b+b*r.a, b*r.b);
}
Frac operator*(const Frac &r)const{
return Frac(a*r.a, b*r.b);
}
Frac operator/(const Frac &r)const{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |