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

18007번 - Rainbow Strings 다국어

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

문제

Define a Rainbow String as a string where every letter in the string is distinct. The empty string is a Rainbow String.

Given a string of lower-case letters, compute the number of different subsequences which are Rainbow Strings. Two subsequences are different if letter at a specific position is included in one subsequence but not the other. Thus, two different subsequences may result in the same string.

For example, consider the string aab. The following six subsequences (in bold and underlined) are the only Rainbow Strings in aab:

aab aab aab aab aab <empty>

The answer may be large, so output the answer modulo 11092019.

입력

The single line of input contains a string s (1 ≤ |s| ≤ 105) which consists only of lower-case letters.

출력

Output a single integer, which is the number of subsequences of s which are Rainbow Strings.

제한

예제 입력 1

aab

예제 출력 1

6

예제 입력 2

icpcprogrammingcontest

예제 출력 2

209952

힌트

출처

ICPC > Regionals > North America > Southeast USA Regional > 2019 Southeast USA Regional Programming Contest > Division 2 J번

ICPC > Regionals > North America > Pacific Northwest Regional > 2019 ICPC Pacific Northwest Region > Division 1 E번

ICPC > Regionals > North America > Pacific Northwest Regional > 2019 ICPC Pacific Northwest Region > Division 2 R번

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

출처

대학교 대회

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

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