# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
765121 | Sohsoh84 | Wombats (IOI13_wombats) | C++17 | 20112 ms | 262144 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 "wombats.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
#define X first
#define Y second
#define sep ' '
#define debug(x) cerr << #x << ": " << x << endl;
const ll MAXN = 5000 + 10;
const ll MAXM = 100 + 10;
int n, m, H[MAXN][MAXM], V[MAXN][MAXM], ps[MAXN][MAXM], sg[MAXN << 1][MAXM][MAXM], opt[MAXM][MAXM], lc[MAXN << 1], rc[MAXN << 1], sgsz = 1;
inline void update_ps(int i) {
for (int j = 2; j <= m; j++)
ps[i][j] = ps[i][j - 1] + H[i][j - 1];
}
inline void update_ans(int mid, int v) {
for (int x = 1; x <= m; x++) {
for (int y = 1; y <= m; y++) {
sg[v][x][y] = sg[lc[v]][x][x] + V[mid][x] + sg[rc[v]][x][y];
for (int f = 1; f <= m; f++) {
sg[v][x][y] = min(sg[v][x][y], sg[lc[v]][x][f] + V[mid][f] + sg[rc[v]][f][y]);
}
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... |