# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
793571 | Jarif_Rahman | Horses (IOI15_horses) | C++17 | 147 ms | 29832 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 pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
const ll md = 1e9+7;
const ll L = 1e9+5;
struct segtree{
int k = 1;
vector<ll> P;
segtree(int n){
while(k < n) k*=2;
P.assign(2*k, 1);
}
void update(int i, ll x){
i+=k;
P[i] = x%md;
i>>=1;
while(i){
P[i] = (P[i<<1]*P[(i<<1)+1])%md;
i>>=1;
}
}
ll product(int l, int r, int nd, int a, int b){
if(a > r || b < l) return 1;
if(a >= l && b <= r) return P[nd];
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... |