# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
56749 | Bodo171 | Horses (IOI15_horses) | C++14 | 1052 ms | 255080 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 <iostream>
#include <set>
#include <climits>
using namespace std;
const int nmax=500005;
set<int> s;
set<int>::iterator it;
const long long mod=1000*1000*1000+7;
long long pr[4*nmax];
int arb[4*nmax];
int bun[nmax],v[nmax];
int mx,x,y,value,poz,st,dr,n,lg,ok,lst,M;
long long ans;
void U(int nod,int l,int r)
{
if(l==r)
{
pr[nod]=value;
return;
}
int m=(l+r)/2;
if(poz<=m) U(2*nod,l,m);
else U(2*nod+1,m+1,r);
pr[nod]=(1LL*pr[2*nod]*pr[2*nod+1])%mod;
}
void Q(int nod,int l,int r)
{
if(st<=l&&r<=dr)
{
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... |