# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1125266 | _8_8_ | Fish 2 (JOI22_fish2) | C++20 | 4099 ms | 101796 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = (int)1e5 + 12, MOD = 998244353;
int n, q;
set<pair<int, int>> s[N], x[N], y[N];
ll a[N], t[N];
void upd(int pos, int val) {
while(pos <= n) {
t[pos] += val;
pos += pos & -pos;
}
}
ll get(int i) {
ll ret = 0;
while(i) {
ret += t[i];
i -= i & -i;
}
return ret;
}
ll get(int l, int r) {
if(l > r) return 0;
return get(r) - get(l - 1);
}
# | 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... |