# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
294107 | AlexLuchianov | Furniture (JOI20_furniture) | C++14 | 555 ms | 22080 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 <iostream>
#include <vector>
#include <cassert>
#include <cmath>
#include <queue>
using ll = long long;
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MAX(a, b) (((a) < (b)) ? (b) : (a))
int const nmax = 1000;
int v[5 + nmax][5 + nmax];
int init[5 + nmax][5 + nmax];
int blocks[5 + nmax * 2];
int n, m;
int solve(int x, int y) {
std::queue<std::pair<int,int>> q;
std::vector<std::pair<int,int>> judge;
if(v[x][y] == 1)
return 1;
if(blocks[x + y] == 1)
return 0;
q.push({x, y});
judge.push_back({x, y});
v[x][y] = 1;
blocks[x + y]--;
int verdict = 1;
while(0 < q.size()) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |