# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
793036 | MODDI | Tracks in the Snow (BOI13_tracks) | C++14 | 2081 ms | 114648 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 pb push_back
#define mp make_pair
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<long long, long long> pll;
using namespace std;
int n, m;
char mat[4001][4001];
bool vis[4001][4001];
int dist[4001][4001], dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
bool in_range(int i, int j){
if(i >= 0 && j >= 0 && i < n && j < m) return true;
return false;
}
int main(){
cin>>n>>m;
for(int i = 0; i < n; i++)
for(int j = 0; j < m; j++)
cin>>mat[i][j];
priority_queue<pair<int, pii>> q;
q.push(mp(0, mp(0, 0)));
int ans = 1;
dist[0][0] = vis[0][0] = 1;
while(!q.empty()){
pii at = q.top().second;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |