Logo
(追記) (追記ここまで)

17876번 - Folding a Cube 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB78423862.295%

문제

It is well known that a set of six unit squares that are attached together in a “cross” can be folded into a cube.

But what about other initial shapes? That is, given six unit squares that are attached together along some of their sides, can we form a unit cube by folding this arrangement?

입력

Input consists of 6 lines each containing 6 characters, describing the initial arrangement of unit squares. Each character is either a ., meaning it is empty, or a # meaning it is a unit square.

There are precisely 6 occurrences of # indicating the unit squares. These form a connected component, meaning it is possible to reach any # from any other # without touching a . by making only horizontal and vertical movements. Furthermore, there is no 2 × 2 subsquare consisting of only #. That is, the pattern

##
##

does not appear in the input.

출력

If you can fold the unit squares into a cube, display can fold. Otherwise display cannot fold.

제한

예제 입력 1

......
......
######
......
......
......

예제 출력 1

cannot fold

예제 입력 2

......
#.....
####..
#.....
......
......

예제 출력 2

can fold

예제 입력 3

..##..
...#..
..##..
...#..
......
......

예제 출력 3

cannot fold

예제 입력 4

......
...#..
...#..
..###.
..#...
......

예제 출력 4

can fold

힌트

출처

ICPC > Regionals > North America > Rocky Mountain Regional > 2019 Rocky Mountain Regional Contest C번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /