# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
425036 | Pbezz | Meetings (IOI18_meetings) | C++14 | 361 ms | 786436 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 "meetings.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
typedef pair<ll,ll> pii;
const ll MAXN = 100005;
const ll INF = 1e16+7;
ll dp[MAXN],seg[4*MAXN],n;
//seg[node]=min index que maximiza dp[index]
void recalculate(ll node){
// cout<<node<<" "<<seg[2*node+1]<<" "<<seg[2*node+2]<<endl;
if(dp[seg[2*node+1]]>=dp[seg[2*node+2]]){
seg[node]=seg[2*node+1];
}else if(dp[seg[2*node+1]]<dp[seg[2*node+2]]){
seg[node]=seg[2*node+2];
}
}
void build(ll node, ll left, ll right){
if(left==right){
seg[node]=left;
}else{
ll middle = (left+right)/2;
build(2*node+1,left,middle);
# | 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... |