# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
540145 | model_code | Dijamant (COCI22_dijamant) | C++17 | 227 ms | 237400 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;
typedef long long llint;
typedef pair <int, int> pi;
const int MAXN = 2005;
int n, m, sol;
char c[MAXN][MAXN];
bool bio[MAXN][MAXN];
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
int mn_sum, mx_sum, mn_dif, mx_dif, ok, cnt;
void dfs (int x, int y) {
if (x == 0 || x == n + 1 || y == 0 || y == m + 1) {
ok = 0;
return;
}
if (bio[x][y] || c[x][y] == '#') return;
bio[x][y] = 1;
cnt++;
mn_sum = min(mn_sum, x + y);
mx_sum = max(mx_sum, x + y);
mn_dif = min(mn_dif, x - y);
mx_dif = max(mx_dif, x - y);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |