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

NUDOTA

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)
Total Submission(s): 750    Accepted Submission(s): 173


Problem Description
Welcome to NUDOTA, it¡¯s a game that attracts thousands of people around the campus. In the game, we first get 603 unit of money, and every seconds we get 1unit of money first. When our hero died, we lose 300 unit of money(you will always have non-negative amount of money). Every time you kills an enemy, you will get 200, and if you are the first one to kill enemy among all players, it is called First Blood and you will get an extra 200 unit. When you killed 3 or more enemies consecutively, that means you played very well in the game, and the system will get you an extra money, when you killed 3enemies consecutively, you get extra 50 unit (that means you get 250 unit when you killed the 3rd enemy), and you killed 4enemies consecutively you get extra 100 unit, and you killed 5 enemies consecutively you get extra 150 unit, and so on¡­ Remember the max unit of extra money you get is 400 unit.
 

Input
Multiple cases.
The input contains N, M, K.(N<1000,M<1000,K<100000)
N means the number of players in team1.
M means the number of players in team2.(lenth of string is less than 1000)
next line containing the N strings indicating the names of N players in team1, seperating by one or more spaces.
next line containing the M strings indicating the names of M players in team2, seperating by one or more spaces.
K means there are K commands and queries.
K lines follow a char that is ¡®K¡¯ or ¡®Q¡¯.
¡®K¡¯ then PLAYER1 kill PLAYER2 in CURRENTTIME.(No two Killing events happens in the same time)
¡®Q¡¯ then PLAYER in CURRENTTIME.
input is sorted by CURRENTTIME.( 0<CURRENTTIME<100,000,000 )
 

Output
If it is a ¡®Q¡¯ command you are asked to output the hero¡¯s money in the CURRENTTIME.
 

Sample Input
1 1 2 a b K a b 10 Q a 11
 

Sample Output
1014
 

Author
alpc21
 

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-22 15:20:12, Gzip enabled