# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
138349 | silxikys | Tracks in the Snow (BOI13_tracks) | C++14 | 2069 ms | 153756 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;
using ll = long long;
const int maxn = 4005;
int H, W;
char grid[maxn][maxn];
bool seen[maxn][maxn];
int dx[] = {0,1,0,-1};
int dy[] = {1,0,-1,0};
bool valid(int x, int y) {
return 0 <= x && x < H && 0 <= y && y < W;
}
int main()
{
ios_base::sync_with_stdio(false); cin.tie(NULL);
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> grid[i][j];
}
}
if (H == 1 && W == 1) {
cout << 1 << '\n';
return 0;
}
queue<pair<int,int>> q, nxt;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |