# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
426963 | A_D | The Big Prize (IOI17_prize) | C++14 | 127 ms | 8960 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 "prize.h"
#include <bits/stdc++.h>
using namespace std;
mt19937 rng((unsigned int) chrono::steady_clock::now().time_since_epoch().count());
const int NN=2e5+100;
vector<int> vec[NN];
int bit[NN];
int seg[4*NN];
vector<int> order;
void build(int p,int s,int e)
{
if(s==e){
seg[p]=1;
return;
}
build(p*2,s,(s+e)/2);
build(p*2+1,(s+e)/2+1,e);
seg[p]=seg[p*2]+seg[p*2+1];
}
int get3(int p,int s,int e,int tar)
{
if(s==e){
return s;
}
// cout<<s<<" "<<e<<" "<<tar<<" "<<seg[p*2]<<endl;
if(seg[p*2]>=tar){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |