T 그는 세인트 Golfus 간결한의 순서에서 형제들은 사람이 할 볼 때마다 짧은기도를 낭송의 전통이 십자가의 기호를 . 최근 관광객들 사이에서 측정 된 높은 수준의 죄로 인해 그들은 수도원에 CCTV를 설치했으며 AI 시대에 오래된 전통을 살리기 위해 당신을 고용했습니다.
당신의 임무는 friars의 손가락 추적 소프트웨어의 출력을 분석하고 얼마나 많은기도가 예정되어 있는지 알려주는 것입니다. 입력은 0과 4 사이의 정수를 포함하는 행렬입니다. 1,2,3,4는 연속적인 순간의 손가락 위치를 나타냅니다. 0은 손가락이 아닌 것을 나타냅니다.
스스로를 횡단 하는 One True Way TM 는 다음과 같습니다.
.1.
3.4
.2.
( "."는 모든 숫자와 일치합니다). 그러나 카메라 회전에 대한 불확실성과 군중에 경건한 동방 정교회 형제의 존재 (One True Way TM 가 반대 방향으로 있음)로 인해 모든 회전과 반사도 계산해야합니다.
.4. .2. .3. .1. .3. .2. .4.
1.2 4.3 2.1 4.3 1.2 3.4 2.1
.3. .1. .4. .2. .4. .1. .3.
하나의 숫자는 여러 개의 십자가의 일부일 수 있습니다. .pray()
위의 3x3 서브 매트릭이 몇 개나 있는지 계산 하여 수녀들이 AI가해야하는 횟수를 결정하도록 도와주세요 . 프로그램이나 함수를 작성하십시오. 합리적이고 편리한 형태로 입력하십시오.
유언 사례 :
// in
[[0,4,2,0],
[1,3,2,4],
[2,3,1,0]]
// out
2
// in
[[4,3,3,2,4,4,1,3,2,2],
[0,3,0,2,1,1,2,3,2,3],
[0,3,1,3,2,4,3,3,1,1],
[4,3,2,3,2,4,1,4,2,3],
[0,4,2,3,4,0,2,3,2,4],
[2,1,0,0,2,0,0,1,2,4],
[4,0,3,1,3,2,0,3,2,3],
[1,4,3,3,1,4,0,1,4,4],
[0,2,4,3,4,3,1,3,0,4],
[3,0,1,0,4,0,3,3,3,3]]
// out
3
// in
[[3,2,3,1,0,3,4,2,1,1,1,1,4,0,1,3,1,1,2,1,1,3,0,1,0,1,1,0,0,1,0,3,4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이기 때문에 허점을 사용해서는 안된다”고 말했다. 메타에 편지 13 : 666
십자가를 만드는 사람들의 약간의 시각화
시각화 주셔서 감사합니다 @Tschallacka.