Submission #9891076


Source Code Expand

main=do
 [a,b,n]<-map read.words<$>getLine
 s<-getLine
 putStrLn$(\(a,b)->(show a)++" "++(show b))$f a b s
f a b[]=(a,b)
f a b(c:s)
 |c=='S'&&a>0=f(a-1)b s
 |c=='C'&&b>0=f a(b-1)s
 |c=='E'&&a>=b&&a>0=f(a-1)b s
 |c=='E'&&a<b&&b>0=f a(b-1)s
 |otherwise=f a b s

Submission Info

Submission Time
Task B - 洋菓子店
User kotatsugame
Language Haskell (GHC 7.10.3)
Score 200
Code Size 268 Byte
Status AC
Exec Time 12 ms
Memory 4988 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 11 ms 4348 KB
02.txt AC 6 ms 2428 KB
03.txt AC 9 ms 3324 KB
04.txt AC 8 ms 3324 KB
05.txt AC 4 ms 1916 KB
06.txt AC 12 ms 4988 KB
07.txt AC 2 ms 1148 KB
08.txt AC 1 ms 508 KB
sample-01.txt AC 1 ms 508 KB
sample-02.txt AC 1 ms 508 KB
sample-03.txt AC 1 ms 508 KB
sample-04.txt AC 1 ms 508 KB