Submission #10079975


Source Code Expand

Copy
var s,c,n,i:Longint;
x:String;
begin
readln(s,c,n);
readln(x);
for i:=1 to n do if(x[i]='S')and(s>0)then dec(s)else if(x[i]='C')and(c>0)then dec(c)else if(x[i]='E')and(s>=c)and(s>0)then dec(s)else if(x[i]='E')and(s<c)and(c>0)then dec(c);
writeln(s);
writeln(c);
end.

Submission Info

Submission Time
Task B - 洋菓子店
User kotatsugame
Language Pascal (FPC 2.6.2)
Score 200
Code Size 274 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Compile Error

/usr/bin/ld.bfd: warning: ./link.res contains output sections; did you forget -T?

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 1 ms 256 KB
02.txt AC 1 ms 128 KB
03.txt AC 1 ms 128 KB
04.txt AC 1 ms 128 KB
05.txt AC 1 ms 128 KB
06.txt AC 1 ms 256 KB
07.txt AC 1 ms 128 KB
08.txt AC 0 ms 128 KB
sample-01.txt AC 0 ms 128 KB
sample-02.txt AC 0 ms 128 KB
sample-03.txt AC 0 ms 128 KB
sample-04.txt AC 0 ms 128 KB