# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
577479 | asbsfds | Nafta (COI15_nafta) | C++14 | 325 ms | 115784 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 maxn = 2010;
const int inf = 0x3f3f3f3f;
const int dx[] = {0, 0, 1, -1};
const int dy[] = {1, -1, 0, 0};
int n, m;
char niz[maxn][maxn];
int dp[maxn][maxn];
int bio[maxn][maxn];
int mini[maxn * maxn], maxi[maxn * maxn], sum[maxn * maxn];
int r[maxn], s[maxn];
int loga[maxn];
int cost[maxn][maxn];
vector< pair<int, int> > events[maxn];
void update(int x, int val) {
for (x++; x < maxn; x += x & -x)
loga[x] += val;
}
int query(int x) {
int out = 0;
for (x++; x > 0; x -= x & -x)
out += loga[x];
return out;
}
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... |