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

23534번 - Avoid Anagrams 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 64 MB97523847.500%

문제

A pair of strings form an anagram if the first of them can be transformed into the second by a permutation of letters. For example, "listen" and "silent" form an anagram, but "master" and "nearest" do not.

A subsequence of string $s = s_1 s_2 \dots s_n$ is a string $s_{a_1} s_{a_2} \dots s_{a_k},ドル where 1ドル \le a_1 < a_2 < \dots < a_k \le n$.

Given string $s,ドル determine the maximal number of its subsequences which can be written down such that no pair of strings in the resulting list does form an anagram.

입력

A single line containing string $s$ of at most 60ドル$ small latin letters.

출력

Print one number --- the answer.

제한

예제 입력 1

jojo

예제 출력 1

8

예제 입력 2

uralchampionship

예제 출력 2

20735

노트

In the first sample the resulting list of strings may be: "j", "o", "jj", "jo", "oo", "jjo", "joo", "jojo".

출처

Contest > Open Cup > 2018/2019 Season > Stage 20: Grand Prix of Ural A번

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

출처

대학교 대회

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

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