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

18896번 - Identifier Sequence 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
7 초 128 MB34000.000%

문제

Johnny is a hacker and recently he came into possession of a database of a large bank. The most important task at hand is to extract the clients' IDs from it. They are sorted and concatenated into a single sequence of digits, without the marks where the concatenation took place; these marks are in a separate file, which Johnny does not have. Johnny wants to retrieve the IDs, that is, compute how many IDs can be obtained by cutting the sequence into pieces. Johnny believes in his luck: if the there are many ways to cut the sequence, surely the one that maximises the number of IDs is the correct one.

As the clients' IDs were assigned at different stages, they can be of different lengths and can have leading zeroes. But Johnny knows that each ID has a unique numerical value, when treated as number written in base-10 positional notation.

입력

First and only line of the input contains a sequence on $n$ (1ドル \leq n \leq 10^6$) base-10 digits. There are no other characters between those digits, in particular, no spaces. This is the sequence of IDs, which Johnny has.

출력

You should write one natural number --- the maximal number of clients' IDs into which the sequence can be cut.

제한

예제 입력 1

10540910

예제 출력 1

4

힌트

The sequence of clients' IDs corresponding to the answer is : 1ドル,ドル 05ドル,ドル 40ドル,ドル 910ドル$. Note the ID 05ドル$ has a numerical value 5ドル$.

출처

ICPC > Regionals > Europe > Central European Regional Contest > Poland Collegiate Programming Contest > AMPPZ 2017 C번

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

출처

대학교 대회

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

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