# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
285890 | Atill83 | Horses (IOI15_horses) | C++14 | 1567 ms | 73080 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 ff first
#define ss second
using namespace std;
const int MAXN = (int) 5e5 + 5;
const int mod = (int) 1e9+7;
typedef long long ll;
typedef pair<ll, ll> pll;
ll x[MAXN], y[MAXN], pre[MAXN], n;
set<pll> st;
ll bp(ll a, ll b){
ll res = 1;
while(b){
if(b % 2) res = (res * a) % mod;
a = (a * a) % mod;
b = b / 2;
}
return res;
}
ll t[4*MAXN];
void build(int v, int l, int r){
if(l == r){ t[v] = y[l];}
else{
int m = (l + r) / 2;
build(2*v, l, m);
build(2*v + 1, m + 1, r);
t[v] = max(t[2*v], t[2*v + 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... |