# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
302405 | user202729 | Palembang Bridges (APIO15_bridge) | C++17 | 1082 ms | 17124 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// might be fast enough. Still log^terrible.
#if not LOCAL
//#define NDEBUG 1
#endif
#include<bits/stdc++.h>
std::vector<int> positions; // it's more convenient to make it global. It's not changed very frequently anyway
/*
* stores a convex piecewise linear function.
* the cuts must be in positions.
*/
struct Tree{
using Data=std::array<int64_t, 2>; // sort of parallel data tuple. Can be used for anything.
std::vector<Data> data; // "lazy"
Tree(std::size_t number): data(number*2){}
static void add1(Data& first, Data sec){
first[0]+=sec[0];
first[1]+=sec[1];
}
int offset() const{return int(data.size()/2);}
// get raw {a, b} value at a particular position.
Data rawGet(int index)const{
# | 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... |