# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
160942 | georgerapeanu | Rectangles (IOI19_rect) | C++14 | 3771 ms | 552964 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 "rect.h"
#pragma once
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
int aib[2505][2505];
int n,m;
void update_aib(int x,int y,int val){
x++;
y++;
for(int i = x;i;i -= (-i) & i){
for(int j = y;j;j -= (-j) & j){
aib[i][j] += val;
}
}
}
int query_aib(int x,int y){
x++;
y++;
int ans = 0;
for(int i = x;i <= m;i += (-i) & i){
for(int j = y;j <= n;j += (-j) & j){
ans += aib[i][j];
}
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |