# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
13785 | gs14004 | 역사적 조사 (JOI14_historical) | C++14 | 2783 ms | 6428 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
const int sz = 300;
struct q{int s,e,n;}qr[100005];
bool cmp(q a, q b){return a.s / sz == b.s / sz ? (a.e < b.e) : (a.s < b.s);}
int a[100005],n,q;
vector<int> p;
long long res[100005];
int lim;
inline void add(int pos, int val, long long* tree){
pos += lim;
tree[pos] += 1ll * val * p[pos-lim];
while(pos > 1){
pos >>= 1;
tree[pos] = max(tree[2*pos],tree[2*pos+1]);
}
}
inline void solve(){
long long tree[270000] = {};
for(lim = 1; lim <= p.size(); lim <<= 1);
int s = 1, e = 0;
for (int i=0; i<q; i++) {
while (s < qr[i].s) {
# | 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... |