# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
294813 | arman_ferdous | Furniture (JOI20_furniture) | C++17 | 469 ms | 6400 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 DEBUG
#define fi first
#define se second
#define pb push_back
#define sz(v) (int)v.size()
#define all(v) v.begin(),v.end()
#define dbg(x) cerr << #x << " is " << x << "\n";
using ll = long long;
using ii = pair<ll,ll>;
const int N = 1010;
int n, m;
int a[N][N];
bool ok(int r, int c) {
if(a[r][c] != 0) return true;
if(a[r + 1][c - 1] == 3 && a[r - 1][c + 1] == 2) return false;
return true;
}
int dx[] = {-1, 0, 1, 1, 1, 0, -1, -1, -1};
int dy[] = {-1, -1, -1, 0, 1, 1, 1, 0, -1};
void add(int r, int c, int ty) {
if(a[r][c] > 1) return;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |