# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
281995 | FlashGamezzz | Art Exhibition (JOI18_art) | Java | 1129 ms | 135980 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.
import java.io.*;
import java.util.*;
public class art {
static int n;
static long[] max = new long[1100000], upd = new long[1100000];
static void upd(int l, int u, long d) {
upd(0, 0, n-1, l, u, d);
}
static void upd(int i, int s, int e, int l, int u, long d) {
if (upd[i] != 0) {
max[i] += upd[i];
if (s != e) {
upd[i * 2 + 1] += upd[i];
upd[i * 2 + 2] += upd[i];
}
upd[i] = 0;
}
if (s > e || s > u || e < l) {
return;
}
if (s >= l && e <= u) {
max[i] += d;
if (s != e) {
upd[i * 2 + 1] += d;
upd[i * 2 + 2] += d;
}
return;
}
upd(i * 2 + 1, s, (s + e)/2, l, u, d);
# | 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... |