# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
779814 | raysh07 | Furniture (JOI20_furniture) | C++17 | 206 ms | 13012 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;
#define int long long
#define INF (int)1e18
#define f first
#define s second
mt19937_64 RNG(chrono::steady_clock::now().time_since_epoch().count());
int n, m;
const int N = 1005;
bool a[N][N], ok[N][N];
int cnt[2 * N];
void upd(int x, int y){
if (!ok[x][y]) return;
cnt[x + y]--;
ok[x][y] = false;
if (!ok[x - 1][y + 1]) upd(x - 1, y), upd(x, y + 1);
if (!ok[x + 1][y - 1]) upd(x, y - 1), upd(x + 1, y);
}
void Solve()
{
cin >> n >> m;
for (int i = 1; i <= n; i++){
for (int j = 1; j <= m; j++){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |