# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
152852 | junodeveloper | 로봇 (IOI13_robots) | C++14 | 1643 ms | 42852 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "robots.h"
#define sz(x) ((int)x.size())
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int offset=1<<20;
int *val[2];
int sum[1000010];
int tree[2][offset<<1];
void Up(int t,int h) {
while(h>0) {
if(tree[t][h*2+1]==-1||(tree[t][h*2]!=-1&&sum[tree[t][h*2]]>sum[tree[t][h*2+1]]))
tree[t][h]=tree[t][h*2];
else tree[t][h]=tree[t][h*2+1];
h/=2;
}
}
inline void Add(int t,int p,int i) {
tree[t][p+offset]=i;
Up(t,(p+offset)/2);
}
inline void Remove(int t,int p) {
tree[t][p+offset]=-1;
Up(t,(p+offset)/2);
컴파일 시 표준 에러 (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... |