# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
402028 | Jasiekstrz | Jousting tournament (IOI12_tournament) | C++17 | 1084 ms | 17984 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<bits/stdc++.h>
#define fi first
#define se second
using namespace std;
const int NN=1e5;
const int L=17;
int bg[NN+10];
int en[NN+10];
int d[NN+10];
int mx[L+2][2][NN+10];
void build_rmq(int N,int *K)
{
for(int rot:{1,0})
{
for(int i=0;i<N-1;i++)
{
mx[0][rot][i]=K[i];
for(int j=1;j<=L;j++)
{
if(i-(1<<(j-1))<0)
mx[j][rot][i]=mx[j-1][rot][i];
else
mx[j][rot][i]=max(mx[j-1][rot][i],mx[j-1][rot][i-(1<<(j-1))]);
}
}
reverse(K,K+N-1);
for(int j=0;j<=L;j++)
{
reverse(mx[j][0],mx[j][0]+N-1);
reverse(mx[j][1],mx[j][1]+N-1);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |