Submission #9799742


Source Code Expand

A,B,N=map(int,input().split())
X=input()
for i in range(len(X)):
  if X[i]=="S":
    if A>0:
      A-=1
  elif X[i]=="C":
    if B>0:
      B-=1
  else:
    if A==0 and B==0:
      continue
    if A<B:
      B-=1
    else:
      A-=1
print(A)
print(B)

Submission Info

Submission Time
Task B - 洋菓子店
User tobusakana
Language Python (3.4.3)
Score 200
Code Size 268 Byte
Status AC
Exec Time 43 ms
Memory 3188 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 4
AC × 12
Set Name Test Cases
Sample sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt
Case Name Status Exec Time Memory
01.txt AC 39 ms 3188 KB
02.txt AC 31 ms 3060 KB
03.txt AC 37 ms 3060 KB
04.txt AC 35 ms 3060 KB
05.txt AC 23 ms 3060 KB
06.txt AC 43 ms 3188 KB
07.txt AC 19 ms 3060 KB
08.txt AC 17 ms 2940 KB
sample-01.txt AC 17 ms 3060 KB
sample-02.txt AC 17 ms 2940 KB
sample-03.txt AC 17 ms 2940 KB
sample-04.txt AC 17 ms 3060 KB