F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Awesome DJMAX

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 302    Accepted Submission(s): 98


Problem Description

CD is an Otaku, he likes to play PSP game, and his favorite game is DJMAX. In this game, the player will listen to the music, then many notes will appear on the screen and fall down from the top. When the notes move to the line on the button of the screen, the player should press the correct keys just on time, and the system will judge your rate and give scores.
Every time after he finishes one mission, he always doubts the Score System of that game, he thinks he should get more points. Now he turns to you for help, can you write an impartial Score System so that tell him how many points he actually can get.
The rule of your Score System is:
a) There are three results CD may get: ¡°COOL¡±, ¡°GOOD¡±, ¡°MISS¡±.
b) Each ¡°COOL¡± will give CD 100 points; Each ¡°GOOD¡± will give CD 50 points; Each ¡°MISS¡± give CD 0 points.
c) Each ¡°COOL¡± will give CD 1/10 ¡°MAX-value¡±; Each ¡°GOOD¡± will give CD 1/20 ¡°MAX-value¡±. After CD gets one ¡°MAX-value¡± or more, every ¡°MAX-value¡± will add extra 10 scores to every ¡°COOL¡± and 5 to every ¡°GOOD¡±.
d) If CD beats notes incessantly, he will get COMBO. 2 notes will be 2 COMBO, 3 notes will be 3 COMBO, and so on. But, if he misses one note, the COMBO will back to zero, and all the ¡°MAX-value¡± he have will be lost.
 

Input
The first line consists of an integer C(C<=50), indicating the number of test cases.
The first line of each case consists of an integers N(N<=1000), indicating the number of notes.
Then N lines follow, each line contains a string, this string will be ¡°COOL¡±, ¡°GOOD¡± or ¡°MISS¡±.
 

Output
For each line, output an integer indicating the totals points CD gets.
 

Sample Input
1 20 COOL COOL COOL GOOD GOOD GOOD GOOD COOL COOL COOL COOL COOL COOL COOL MISS COOL MISS MISS GOOD COOL
 

Sample Output
1470
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 00:00:34, Gzip enabled