# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
581540 | alexdd | Tracks in the Snow (BOI13_tracks) | C++17 | 1554 ms | 122036 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<deque>
using namespace std;
int n,m;
char mat[4001][4001];
int dirlin[4]={1,-1,0,0};
int dircol[4]={0,0,1,-1};
deque<int> dqlin;
deque<int> dqcol;
int best[4001][4001];
bool good(int lin, int col)
{
if(lin>=1 && lin<=n && col>=1 && col<=m)
return 1;
return 0;
}
int main()
{
cin>>n>>m;
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
{cin>>mat[i][j];best[i][j]=4000*4000+100;}
dqlin.push_back(1);
dqcol.push_back(1);
best[1][1]=1;
int lin,col;
while(dqlin.empty()==0)
{
lin=dqlin.front();
col=dqcol.front();
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |