# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
488022 | egekabas | Horses (IOI15_horses) | C++14 | 183 ms | 66660 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>
#define all(x) (x).begin(), (x).end()
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ull, ull> pull;
typedef pair<int, int> pii;
typedef pair<ld, ld> pld;
const ll mod = 1e9+7;
struct node{
ll y, lef, rig, lefmod, rigmod;
};
node merge(node a, node b){
node ret;
if(a.y > min(mod, a.rig*b.lef)*b.y){
ret.y = a.y;
ret.lef = a.lef;
ret.rig = min(mod, min(mod, a.rig*b.lef)*b.rig);
ret.lefmod = a.lefmod;
ret.rigmod = a.rigmod*b.lefmod%mod*b.rigmod%mod;
}
else{
ret.y = b.y;
ret.lef = min(mod, min(mod, a.lef*a.rig)*b.lef);
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... |