# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
30832 | inqr | Horses (IOI15_horses) | C++14 | 1239 ms | 76264 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)1000000007
using namespace std;
int n;
ll 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 lz_upd(int l,int r,int stp){
st[stp]=merge(st[stp],lz[stp]);
if(l!=r){
lz[stp*2]=merge(lz[stp*2],lz[stp]);
lz[stp*2+1]=merge(lz[stp*2+1],lz[stp]);
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... |