# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
298161 | TMJN | Horses (IOI15_horses) | C++17 | 1596 ms | 70724 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;
constexpr long long mod=1000000007;
pair<long double,long long> treemax[1<<20],treeupd[1<<20];
int N,*X,*Y;
long long pw(long long x,int y){
long long a=1;
while(y){
if(y&1)a=a*x%mod;
x=x*x%mod;
y/=2;
}
return a;
}
long long modinv(long long x){
return pw(x,mod-2);
}
void update(int k,int l,int r,int p,int q,long long val,double ln){
if(q<l||r<p)return;
else if(p<=l&&r<=q){
treemax[k].second*=val;
treemax[k].second%=mod;
treemax[k].first+=ln;
treeupd[k].second*=val;
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... |