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

5013번 - Death Knight Hero 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB89059956967.337%

문제

There once was a champion of WoW Arthasdk the name he was bestowed He Death Gripped you to his side His Chains of Ice stopped your stride And Obliterates made you say ”OWW!”

But one day our hero got puzzled His Death Grip totally fizzled In his darkest despair He could barely hear ”OMG NOOB u Chains of Iced than u Death Gripped”

입력

You are given a recording of the abilities our hero used in his battles.

The first line of input will contain a single integer n (1 ≤ n ≤ 100), the number of battles our hero played.

Then follow n lines each with a sequence of ki (1 ≤ ki ≤ 1000) characters, each of which are either ’C’, ’D’ or ’O’. These denote the sequence of abilities used by our hero in the i-th battle. ’C’ is Chains of Ice, ’D’ is Death Grip and ’O’ is Obliterate.

출력

Output the number of battles our hero won, assuming he won each battle where he did not Chains of Ice immediately followed by Death Grip.

제한

예제 입력 1

3
DCOOO
DODOCD
COD

예제 출력 1

2

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Nordic Collegiate Programming Contest > NCPC 2011 C번

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

출처

대학교 대회

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

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