# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
786055 | orcslop | Tracks in the Snow (BOI13_tracks) | C++17 | 504 ms | 129060 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 sz(x) (int)(x).size()
const int MAXN = 4005;
const int dx[4] = {-1, 1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
int n, m;
char snow[MAXN][MAXN];
int depth[MAXN][MAXN];
deque<pair<int, int>> dq;
bool inbounds(int x, int y){
return (x >= 0 && y >= 0 && x < n && y < m && snow[x][y] != '.');
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
cin >> n >> m;
for(int i = 0; i < n; i++){
for(int j = 0; j < m; j++){
cin >> snow[i][j];
}
}
depth[0][0] = 1;
dq.push_back(make_pair(0, 0));
int ans = 0;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |