# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
39539 | 14kg | 역사적 조사 (JOI14_historical) | C++11 | 4000 ms | 15328 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#define N 100001
#define NN 262144
#define SQ 300
#define max2(x,y) (x>y?x:y)
using namespace std;
typedef pair<pair<int, int>, int> ppi;
int n, q_len, M_len, nn, in[N], Md[N];
long long tree[NN], out[N];
ppi Q[N];
set<int> S;
map<int, int> M;
bool cmp(ppi x, ppi y) {
pair<int,int> tx = { x.first.first / SQ,x.first.second / SQ };
pair<int,int> ty = { y.first.first / SQ,y.first.second / SQ };
return x < y;
}
void Push(int x, long long num) {
int temp;
tree[nn + x - 1] += num;
for (int lev = (nn + x - 1) / 2; lev; lev /= 2) {
temp = tree[lev];
tree[lev] = max2(tree[lev * 2], tree[lev * 2 + 1]);
if (temp == tree[lev]) break;
}
컴파일 시 표준 에러 (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... |