# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
579528 | JooDdae | Horses (IOI15_horses) | C++17 | 1491 ms | 69844 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;
using ll = long long;
#define mid ((l+r) >> 1)
const ll INF = 1e9+1;
const int mod = 1e9+7;
int n, x[500500], y[500500];
ll t1[2002002], t3[2002002];
array<int, 2> t2[2002002];
set<int> s;
ll build1(int node = 1, int l = 0, int r = n-1){
if(l == r) return t1[node] = x[l];
return t1[node] = min(INF, build1(node*2, l, mid) * build1(node*2+1, mid+1, r));
}
array<int, 2> build2(int node = 1, int l = 0, int r = n-1){
if(l == r) return t2[node] = {y[l], l};
return t2[node] = max(build2(node*2, l, mid), build2(node*2+1, mid+1, r));
}
ll build3(int node = 1, int l = 0, int r = n-1){
if(l == r) return t3[node] = x[l];
return t3[node] = build3(node*2, l, mid) * build3(node*2+1, mid+1, r) % mod;
}
void update1(int pos, int val, int node = 1, int l = 0, int r = n-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... |