# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
436692 | alexis_1729 | Tracks in the Snow (BOI13_tracks) | C++14 | 871 ms | 153144 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define lli long long int
const int maxn=1e4+1;
const int MOD=1e9+7;
int h,w;
char mx[maxn][maxn]; int ca[maxn][maxn];
#define pi pair<int,int>
int vx[]={1, -1, 0, 0},
vy[]={0, 0, 1, -1};
bool good(int x,int y){
return x>=0 && x<h && y>=0 && y<w && mx[x][y]!='.';
}
int main()
{
ios_base::sync_with_stdio(0);cin.tie(0);
cin>>h>>w;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>mx[i][j];
}
}
deque<pi>dq;
dq.push_back({0,0});int ans=0;
ca[0][0]=1;
while(!dq.empty()){
pi a=dq.front();
dq.pop_front();
ans=max(ans,ca[a.first][a.second]);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |