# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
446111 | JovanB | Tracks in the Snow (BOI13_tracks) | C++17 | 655 ms | 169724 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int mat[4005][4005];
int n, m;
int mx = 0;
int dist[4005][4005];
void bfs(){
deque <pair <int, int>> q;
q.push_front({1, 1});
for(int i=0; i<=n+1; i++){
for(int j=0; j<=m+1; j++){
dist[i][j] = 1000000000;
if(mat[i][j] == 0) dist[i][j] = -500;
}
}
dist[1][1] = 0;
while(!q.empty()){
pair <int, int> p = q.front();
q.pop_front();
int i = p.first;
int j = p.second;
mx = max(mx, dist[i][j]);
if(mat[i-1][j] == mat[i][j]){
if(dist[i][j] < dist[i-1][j]){
dist[i-1][j] = dist[i][j];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |