# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
782002 | Arturgo | Tourism (JOI23_tourism) | C++14 | 229 ms | 38080 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>
using namespace std;
const int INIT = (1 << 17) - 1;
int sommes[(1 << 18)];
void ajoute(int pos, int val) {
pos += (1 << 17);
while(pos != 0) {
sommes[pos] += val;
pos /= 2;
}
}
int somme_entre(int deb, int fin) {
deb += (1 << 17);
fin += (1 << 17);
int somme = 0;
while(deb < fin) {
if(deb % 2 == 1) {
somme += sommes[deb];
deb++;
}
if(fin % 2 == 1) {
fin--;
somme += sommes[fin];
}
deb /= 2;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |