개발/알고리즘
[프로그래머스] 경주로 건설 (python)
코딩테스트 연습 - 경주로 건설 [[0,0,0,0,0,0,0,1],[0,0,0,0,0,0,0,0],[0,0,0,0,0,1,0,0],[0,0,0,0,1,0,0,0],[0,0,0,1,0,0,0,1],[0,0,1,0,0,0,1,0],[0,1,0,0,0,1,0,0],[1,0,0,0,0,0,0,0]] 3800 [[0,0,1,0],[0,0,0,0],[0,1,0,1],[1,0,0,0]] 2100 [[0,0,0,0,0,0],[0,1,1,1,1,0],[0,0,1,0,0,0],[1,0,0,1,0,1],[ programmers.co.kr 구현하면 되는 문제이다. 처음에는 board가 1이 아니고 board[nx][ny]가 board[x][y]+cost 보다 클 때 update를 해줬었는데 아래 반례를 만족시키지 못한다. b..
2021. 5. 1. 18:17
최근댓글