[algorithm] 백준 - 감시
삼성 SW 기출 문제이며, 꽤나 긴 코드를 요구하는 문제이다. dfs로 구현했다. CCTV 종류는 총 5가지로, 다음과 같이 회전할 수 있다. 따라서 방향을 미리 설정해뒀다. pair direction[] = {{-1,0}, {1,0}, {0, -1}, {0, 1}}; pair secondDirection[] = {{{-1,0}, {1,0}},{{0,-1},{0,1}}}; pair thirdDirection[] = {{{-1,0},{0,-1}},{{1,0},{0,1}}, {{1,0},{0,-1}}, {{-1,0},{0,1}}}; tuple fourthDirection[] = {{{-1,0},{0,-1},{1,0}},{{0,-1},{-1,0},{0,1}},{{1,0},{-1,0},{0,1}},{{0,1},..
2020. 12. 24.