codeFlyer (bitFlyer Programming Contest)

Submission #10079975

Source codeソースコード

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

Task問題 B - 洋菓子店
User nameユーザ名 kotatsugame
Created time投稿日時
Language言語 Pascal (FPC 2.6.2)
Status状態 AC
Score得点 200
Source lengthソースコード長 274 Byte
File nameファイル名
Exec time実行時間 1 ms
Memory usageメモリ使用量 256 KB

Compiler messageコンパイルメッセージ

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

Test case

Set

Set name Score得点 / Max score Cases
Sample - sample-01.txt,sample-02.txt,sample-03.txt,sample-04.txt
All 200 / 200 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

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
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
sample-01.txt AC
sample-02.txt AC
sample-03.txt AC
sample-04.txt AC