# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
448685 | Christopher_ | Tracks in the Snow (BOI13_tracks) | C++17 | 643 ms | 131124 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int n, m;
cin >> n >> m;
vector<string> mat(n);
vector<vector<int>> dist(n, vector<int>(m));
for (int i = 0; i < n; ++i) {
cin >> mat[i];
}
deque<pair<int,int>> q;
q.push_front({0, 0});
dist[0][0] = 1;
auto Check = [&](int x, int y) {
return x >= 0 && x < n && y >= 0 && y < m && mat[x][y] != '.' && dist[x][y] == 0;
};
int ans = 0;
while (!q.empty()) {
int x = q.front().first, y = q.front().second; q.pop_front();
ans = max(ans, dist[x][y]);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |