# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
289178 | wdjpng | Ancient Books (IOI17_books) | C++17 | 122 ms | 376 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "books.h"
#define rep(i,n) for(int i = 0; i < n; i++)
#define lint long long
using namespace std;
vector<int>fen;
int n;
void up(int i, int val){
i++;
for(; i <=n; i+=i&-i){
fen[i]+=val;
}
}
int get(int i){
i++;
int s=0;
for(;i>0;i-=i&-i){
s+=fen[i];
}
return s;
}
int get_range(int l, int r){
return get(r) - get(l-1);
}
Compilation message (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... |