# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
134080 | fredbr | Tracks in the Snow (BOI13_tracks) | C++17 | 1452 ms | 1048576 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;
int const maxn = 4010;
int cnt = 0;
int n, m;
char vis[maxn][maxn];
char v[maxn][maxn];
using ii = pair<int, int>;
vector<ii> nxt;
void dfs(int x, int y) {
static int const dx[] = {0, 1, 0, -1};
static int const dy[] = {1, 0, -1, 0};
if (vis[x][y]) return;
if (v[x][y] == '.') return;
vis[x][y] = 1;
cnt--;
for (int i = 0; i < 4; i++) {
int xx = x + dx[i];
int yy = y + dy[i];
if (xx >= 0 and xx < n and yy >= 0 and yy < m) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |