# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
388295 | Monchito | Tracks in the Snow (BOI13_tracks) | C++14 | 1458 ms | 101784 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 <iostream>
#include <vector>
#include <deque>
#include <algorithm>
using namespace std;
using ii = pair<int,int>;
int xd[] = {1,-1,0,0}, yd[] = {0,0,1,-1};
#define forn(i, x, n) for(int i = (x); i < (int)(n); i++)
const int MAXS = 4000;
int N, M;
char G[MAXS][MAXS];
bool inside(int i, int j){
return (i > -1 && j > -1 && i < N && j < M && G[i][j] != '.');
}
int main(){
scanf("%d%d",&N,&M);
forn(i,0,N) forn(j,0,M) scanf(" %c",&G[i][j]);
deque<pair<ii, int>> Q;
vector<vector<bool>> vis(N, vector<bool>(M, false));
int ans=0;
Q.push_front({{0,0},1});
while(!Q.empty()){
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |