# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
629574 | somethingnew | 송신탑 (IOI22_towers) | C++17 | 4040 ms | 3232 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "towers.h"
#include <cassert>
#include <cstdio>
#include <vector>
using namespace std;
vector<int> h;
struct segtree{
int sz;
vector<int> tree;
void init(int n, vector<int> a) {
sz = 1;
while (sz < n)
sz *= 2;
tree.assign(sz * 2, 0);
for (int i = 0; i < n; ++i) {
tree[i + sz] = a[i];
}
for (int i = sz - 1; i > 0; --i) {
tree[i] = tree[i * 2] + tree[i * 2 + 1];
}
}
int get(int l, int r) {
int res = 0;
while (l <= r) {
if (l & 1) {
res += tree[l];
l++;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |