# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
835960 | vgoofficial | Tracks in the Snow (BOI13_tracks) | C++14 | 571 ms | 158928 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;
ll mod = 1000000007;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int h,w;
cin >> h >> w;
int field[h][w];
for(int i = 0; i < h; i++) {
string s;
cin >> s;
for(int j = 0; j < w; j++) {
if(s[j]=='F') {
field[i][j]=1;
} else if(s[j]=='R') {
field[i][j]=2;
} else {
field[i][j]=0;
}
}
}
deque<pair<int, int>> q;
q.push_back({0,0});
vector<vector<int>> dist(h, vector<int>(w, -1));
dist[0][0]=1;
int ans = 1;
vector<int> dx{-1, 1, 0, 0}, dy{0,0,-1,1};
while(q.size()) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |