3BV 의 지뢰 찾기 보드는 이미 해결책을 알고있는 경우 보드를 해결하는 데 필요한 왼쪽 클릭의 최소 수를 나타냅니다. "Bechtel 's Board Benchmark Value"의 약자입니다. 여기 그의 사이트가 그것을 설명하고 있습니다.
아래는 해결 된 지뢰 찾기 보드입니다. 깃발은 광산을 나타냅니다. 광산이없는 타일은 대각선을 포함하여 인접한 광산의 수를 나타냅니다 (단, "0"이 있어야 함). 이미지는 보드를 해결하기 위해 클릭해야 할 타일을 보여줍니다.
3BV에 대한 클릭 수는 다음과 같습니다.
- 빈 타일로 된 홍수로 채워진 각 영역 (인접한 제로 광산)과 비어 있지 않은 이웃에 대해 하나씩 .
- 서로 다른 비광 타일.
다른 예 (3BV = 39)
0
명확하고 1
광산 (또는 부울)에 대해 2D 값 배열이 주어지면 3BV를 반환하십시오 .
보드의 크기는 8x8 이상, 24x30 이하입니다. 프로그램은 예제뿐만 아니라 가능한 모든 보드를 처리해야합니다.
참고 : 보드에는 광산 만 포함되지 않습니다.
예제 I / O :
[[0,0,0,0,0,0,0,0],
[0,0,0,1,0,0,0,0],
[0,0,0,1,0,0,1,0],
[0,1,0,0,1,0,0,0],
[0,0,1,0,0,0,0,1],
[0,0,0,1,0,0,0,0],
[0,0,0,0,0,0,1,0],
[0,0,0,0,0,0,0,1]]
23
[[0,0,1,0,0,0,1,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0],
[0,0,0,0,0,1,1,1,0,0,1,0,0,0,0,0,0,1,0,0,1,0,1,1,0,0,0,0,0,0],
[0,1,0,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,1,0,0,0,1,0,1,0,1,0],
[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,0,0,0],
[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0],
[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0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