# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
988483 | kflippy | Tracks in the Snow (BOI13_tracks) | C++17 | 1087 ms | 125020 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 h, w;
char s[4000][4000];
bool chk(pair<int, int> c)
{
return c.first > -1 && c.first < h && c.second < w && c.second > -1 && s[c.first][c.second] != '.';
}
int
main()
{
cin >> h >> w;
deque<pair<int, int>> q;
vector<vector<int>> d(h, vector<int>(w));
d[0][0] = 1;
for(int i = 0; i < h; ++i) {
for(int j = 0; j < w; ++j) {
cin >> s[i][j];
}
}
q.push_front({0, 0});
vector<int> dx = {-1, 0, 1, 0}, dy = {0, 1, 0, -1};
int ans = 0;
while(!q.empty()) {
pair<int, int> x = q.front();
q.pop_front();
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |