# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
609863 | jairRS | Horses (IOI15_horses) | C++17 | 579 ms | 54204 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 "horses.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MAXN = 500000;
const ll MOD = 1000000000LL + 7LL;
ll gN, gX[MAXN], gY[MAXN];
struct bignum{
ll val = 0;
bool overMOD = false;
bignum(ll _val){
overMOD = _val/MOD > 0;
val = _val % MOD;
}
void scale(ll x){
bignum newBignum = bignum(val * x);
overMOD |= newBignum.overMOD;
val = newBignum.val;
}
bignum operator*(const bignum &a) const {
bignum res(val*a.val);
res.overMOD |= overMOD | a.overMOD;
return res;
}
};
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |