# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
470971 | iulia13 | Furniture (JOI20_furniture) | C++14 | 2426 ms | 12980 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 N = 1005;
int n, m;
bool SePoate[N][N];
int diag[N + N];
int b = 1;
struct ura{
int x, y;
};
int verif(int x, int y)
{
if (x < 1 || y < 1 || n < x || m < y)
return 1;
return 0;
}
void upd(int x, int y)
{
if (verif(x, y) || SePoate[x][y] == false)
return;
SePoate[x][y] = false;
diag[x + y]--;
if (verif(x - 1, y + 1) || SePoate[x - 1][y + 1] == false)
{
upd(x, y + 1);
upd(x - 1, y);
}
if (verif(x + 1, y - 1) || SePoate[x + 1][y - 1] == false)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |