|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|1 초||128 MB||175||101||92||58.228%|
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.
3 DCOOO DODOCD COD