# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
781114 | hasan_tawsif | Tracks in the Snow (BOI13_tracks) | C++14 | 673 ms | 130936 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 inf = (int) 1e9;
int dx[] = {-1, +1, 0, 0};
int dy[] = {0, 0, +1, -1};
char adj[4002][4002];
int dis[4002][4002];
void solve() {
int n, m; cin >> n >> m;
for (int i = 1; i <= n; ++i)
for (int j = 1; j <= m; ++j) cin >> adj[i][j], dis[i][j] = inf;
deque<pair<int , int > > dq;
dq.push_front({1, 1});
dis[1][1] = 1;
auto valid = [&] (int r, int c) {
return r >= 1 and r <= n and c >= 1 and c <= m and adj[r][c] != '.';
};
int ans = 0;
while (!dq.empty()) {
auto [r, c] = dq.front(); dq.pop_front();
ans = max(ans, dis[r][c]);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |