# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1036520 | model_code | Toy (CEOI24_toy) | C++17 | 236 ms | 5572 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.
// Author: Ondra Sladký
// Alternative optimal solution which is based in the ideas in the (broken) solutions
// coloring edges and vertices.
// It colors edges through which individual rectangles can move. It also colors edges inside
// the rectangles for each position of the rectangle (which is why it works) which is for simplicity
// done using edge coloring of rectangles of size k-1 and l-1.
// It runs in O(wh)
// It should solve every subtask.
#include <bits/stdc++.h>
using namespace std;
#define f(i, a, b) for (int i = (a); i < (b); i++)
#define v vector
int w, h, k, l;
int xhI, yhI, xvI, yvI;
int xt, yt;
v<v<bool>> grid;
v<v<bool>> validH;
v<v<bool>> validV;
v<v<bool>> statesH;
v<v<v<bool>>> stateHedges;
v<v<bool>> statesV;
v<v<v<bool>>> stateVedges;
v<v<bool>> states;
int main() {
# | 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... |