# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
748017 | ETheBest3 | Robots (IOI13_robots) | C++14 | 1 ms | 1364 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 "robots.h"
#include<bits/stdc++.h>
#define lli int
using namespace std;
const lli MAXN=1000005, INF=999999999;
lli tree[4*MAXN], X[MAXN], Y[MAXN], S[MAXN], W[MAXN], A, B, T;
bool used[MAXN];
struct rob{
lli w, s, ind;
const bool operator <(rob p){
if(s!=p.s)return s>p.s;
if(w!=p.w)return w<p.w;
return ind<p.ind;
}
};
rob a[MAXN];
void build_tree(lli ind, lli l, lli r){
if(l==r){
tree[ind]=a[l].w;
return;
}
lli mid=(l+r)/2;
build_tree(2*ind, l, mid);
build_tree(2*ind+1, mid+1, r);
tree[ind]=min(tree[2*ind], tree[2*ind+1]);
return;
}
void update(lli ind, lli l, lli r, lli q, lli d){
if(l>q or r<q)return;
if(l==r){
# | 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... |