You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>여러 방들로 둘러싸인 구역을 탈출해야 한다. 알맞은 비밀번호를 입력하면 탈출할 수 있다.</p>
20
+
21
+
<p>구역의 지도는 <mjx-containerclass="MathJax"jax="CHTML"style="font-size: 109%; position: relative;"><mjx-mathclass="MJX-TEX"aria-hidden="true"><mjx-miclass="mjx-i"><mjx-cclass="mjx-c1D441 TEX-I"></mjx-c></mjx-mi><mjx-moclass="mjx-n"space="3"><mjx-cclass="mjx-cD7"></mjx-c></mjx-mo><mjx-miclass="mjx-i"space="3"><mjx-cclass="mjx-c1D440 TEX-I"></mjx-c></mjx-mi></mjx-math><mjx-assistive-mmlunselectable="on"display="inline"><mathxmlns="http://www.w3.org/1998/Math/MathML"><mi>N</mi><mo>×</mo><mi>M</mi></math></mjx-assistive-mml><spanaria-hidden="true"class="no-mathjax mjx-copytext">$N \times M$</span></mjx-container> 크기의 격자판으로 나타낼 수 있으며 각 칸은 방을 의미하고 각 칸에는 0부터 9까지의 숫자가 적혀있는데 이는 해당하는 방에 적힌 숫자를 의미한다.</p>
22
+
23
+
<p>상하좌우 4가지 방향으로만 움직일 수 있으며, 0이 적힌 방은 들어갈 수 없다.</p>
24
+
25
+
<p>비밀번호의 힌트는 다음과 같다.</p>
26
+
27
+
<ol>
28
+
<li>임의의 방에서 다른 방으로 이동할 때는 항상 두 방 사이의 최단 경로로 이동한다.</li>
29
+
<li>1번을 만족하는 경로 중 가장 긴 경로의 시작 방과 끝 방에 적힌 숫자의 합</li>
30
+
</ol>
31
+
32
+
<p>만약 위 2가지 조건을 만족하는 경로가 여러 개라면, 시작 방과 끝 방에 적힌 숫자의 합이 가장 큰 값이 비밀번호가 된다.</p>
33
+
34
+
<p>시작 방과 끝 방은 동일한 위치일 수도 있다.</p>
35
+
36
+
<p><예시> <mjx-containerclass="MathJax"jax="CHTML"style="font-size: 109%; position: relative;"><mjx-mathclass="MJX-TEX"aria-hidden="true"><mjx-mnclass="mjx-n"><mjx-cclass="mjx-c35"></mjx-c></mjx-mn><mjx-moclass="mjx-n"space="3"><mjx-cclass="mjx-cD7"></mjx-c></mjx-mo><mjx-mnclass="mjx-n"space="3"><mjx-cclass="mjx-c35"></mjx-c></mjx-mn></mjx-math><mjx-assistive-mmlunselectable="on"display="inline"><mathxmlns="http://www.w3.org/1998/Math/MathML"><mn>5</mn><mo>×</mo><mn>5</mn></math></mjx-assistive-mml><spanaria-hidden="true"class="no-mathjax mjx-copytext">$5 \times 5$</span></mjx-container> 형태의 지도가 주어질 때, 위의 2가지 조건을 만족하는 경로는 다음과 같다.</p>
0 commit comments