# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
30825 | inqr | Horses (IOI15_horses) | C++14 | 629 ms | 72360 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>
#define pb push_back
#define mp make_pair
#define rt insert
#define st first
#define nd second
#define ll long long
#define pii pair < int , int >
#define DB printf("debug\n");
#define umax( x , y ) x = max( x , (y) )
#define umin( x , y ) x = min( x , (y) )
#define all(x) x.begin() , x.end()
#define MAXN 500005
#define MOD (ll)1e9+7
using namespace std;
int n;
int x[MAXN],y[MAXN];
pair<double,ll> st[4*MAXN];
pair<double,ll> lz[4*MAXN];
pair<double,ll> merge(pair<double,ll> a,pair<double,ll> b){
return {a.st+b.st,(a.nd*b.nd+MOD)%MOD};
}
void upd(int ul,int ur,double uv1,ll uv2,int l,int r,int stp){
if(l>r||ur<l||r<ul)return;
st[stp]=merge(st[stp],lz[stp]);
if(l!=r){
lz[stp*2]=lz[stp*2+1]=lz[stp];
}
lz[stp]=mp(0,1);
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... |