# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
480093 | 1bin | 조개 줍기 (KOI17_shell) | C++14 | 210 ms | 50700 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;
#define all(v) v.begin(), v.end()
typedef long long ll;
const int NMAX = 1505;
int n, k, dp[NMAX][NMAX], a[NMAX][NMAX], base = 1, ans, x, y, l, r, p;
vector<int> seg[NMAX];
char c;
void update(int y, int idx, int v) {
idx += base;
while (idx) {
seg[y][idx] += v;
idx /= 2;
}
return;
}
int find(int y, int l, int r) {
int ret = dp[y][r];
l += base; r += base;
while (l <= r) {
if (l & 1) ret += seg[y][l++];
if (!(r & 1)) ret += seg[y][r--];
l /= 2; r /= 2;
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |