# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
437673 | MohammadAghil | Tracks in the Snow (BOI13_tracks) | C++14 | 851 ms | 155296 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;
typedef long long ll;
#define rep(i,l,r) for(int i = (l); i < r; i++)
#define per(i,r,l) for(int i = (r); i >= l; i--)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
#define pb push_back
#define ff first
#define ss second
const ll mod = 1e9 + 7, maxn = 4e3 + 5, inf = 1e9 + 5;
int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, 1, 0, -1};
int a[maxn][maxn];
int main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n, m; cin >> n >> m;
rep(i,0,n){
string s; cin >> s;
rep(j,0,m){
if(s[j] == 'R') a[i][j] = 1;
else if(s[j] == 'F') a[i][j] = 2;
}
}
vector<vector<int>> dist(n, vector<int>(m, inf));
dist[0][0] = 1;
deque<pair<int, int>> q; q.pb({0, 0});
while(sz(q)){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |