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

22628번 - Colored Octahedra 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
8 초 (추가 시간 없음) 512 MB17111076.923%

문제

A young boy John is playing with eight triangular panels. These panels are all regular triangles of the same size, each painted in a single color; John is forming various octahedra with them.

While he enjoys his playing, his father is wondering how many octahedra can be made of these panels since he is a pseudo-mathematician. Your task is to help his father: write a program that reports the number of possible octahedra for given panels. Here, a pair of octahedra should be considered identical when they have the same combination of the colors allowing rotation.

입력

The input has the following format:

Color1 Color2 ... Color8

Each Colori (1 ≤ i ≤ 8) is a string of up to 20 lowercase alphabets and represents the color of the i-th triangular panel.

출력

Output the number of different octahedra that can be made of given panels.

제한

예제 입력 1

blue blue blue blue blue blue blue blue

예제 출력 1

1

예제 입력 2

red blue blue blue blue blue blue blue

예제 출력 2

1

예제 입력 3

red red blue blue blue blue blue blue

예제 출력 3

3

힌트

출처

Contest > ICPC Japanese Alumni Group > JAG Summer Camp > JAG Summer Camp 2009 Day 3 E번

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

출처

대학교 대회

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

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