# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
597134 | PiejanVDC | Horses (IOI15_horses) | C++17 | 1591 ms | 74888 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;
vector<long long>x,y;
long long mod = (long long)1000000007;
int last;
int ans;
int l,r;
vector<long long>mul(8*500000), correct_mul(8*500000);
void build(int i, int j, int p) {
if(i == j) {
mul[p] = correct_mul[p] = x[i];
return;
}
int mid = (i+j)/2;
build(i, mid, 2*p);
build(mid+1, j, 2*p+1);
mul[p] = mul[2*p] * mul[2*p+1];
mul[p] = min(mul[p], (long long)1e9+5);
correct_mul[p] = correct_mul[2*p] * correct_mul[2*p+1];
correct_mul[p] %= mod;
}
long long get_mul(int i, int j, int p) {
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... |