Submission #8590


Source Code Expand

import Data.List
main=getLine>>getLine>>=print.f
f x = minimum[length$foldr(#)x lr|lr<-mapM(\_->mapM(\_->"ABXY")[1,2])[1,2]]
s#(a:b:x) | s == [a,b] = '_':s#x
s#(a:x) = a:s#x
s#[] = []

Submission Info

Submission Time
Task C - コマンド入力
User notogawa
Language Haskell (GHC 7.4.1)
Score 100
Code Size 188 Byte
Status AC
Exec Time 91 ms
Memory 1940 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 45
Set Name Test Cases
All 00_retmax.txt, 00_retmin.txt, 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_rnd_00.txt, 01_rnd_01.txt, 01_rnd_02.txt, 01_rnd_03.txt, 01_rnd_04.txt, 01_rnd_05.txt, 01_rnd_06.txt, 01_rnd_07.txt, 01_rnd_08.txt, 01_rnd_09.txt, 01_rnd_10.txt, 01_rnd_11.txt, 01_rnd_12.txt, 01_rnd_13.txt, 01_rnd_14.txt, 01_rnd_15.txt, 01_rnd_16.txt, 01_rnd_17.txt, 01_rnd_18.txt, 01_rnd_19.txt, 02_twothree_00.txt, 02_twothree_01.txt, 02_twothree_02.txt, 02_twothree_03.txt, 02_twothree_04.txt, 02_twothree_05.txt, 02_twothree_06.txt, 02_twothree_07.txt, 02_twothree_08.txt, 02_twothree_09.txt, 02_twothree_10.txt, 02_twothree_11.txt, 02_twothree_12.txt, 02_twothree_13.txt, 02_twothree_14.txt, 02_twothree_15.txt, 02_twothree_16.txt, 02_twothree_17.txt, 02_twothree_18.txt, 02_twothree_19.txt
Case Name Status Exec Time Memory
00_retmax.txt AC 91 ms 1856 KB
00_retmin.txt AC 25 ms 1420 KB
00_sample_00.txt AC 27 ms 1460 KB
00_sample_01.txt AC 25 ms 1804 KB
00_sample_02.txt AC 24 ms 1720 KB
01_rnd_00.txt AC 48 ms 1844 KB
01_rnd_01.txt AC 48 ms 1940 KB
01_rnd_02.txt AC 48 ms 1852 KB
01_rnd_03.txt AC 50 ms 1848 KB
01_rnd_04.txt AC 49 ms 1852 KB
01_rnd_05.txt AC 51 ms 1792 KB
01_rnd_06.txt AC 51 ms 1852 KB
01_rnd_07.txt AC 51 ms 1900 KB
01_rnd_08.txt AC 49 ms 1848 KB
01_rnd_09.txt AC 51 ms 1888 KB
01_rnd_10.txt AC 51 ms 1844 KB
01_rnd_11.txt AC 50 ms 1784 KB
01_rnd_12.txt AC 49 ms 1932 KB
01_rnd_13.txt AC 51 ms 1848 KB
01_rnd_14.txt AC 49 ms 1936 KB
01_rnd_15.txt AC 51 ms 1896 KB
01_rnd_16.txt AC 49 ms 1924 KB
01_rnd_17.txt AC 50 ms 1844 KB
01_rnd_18.txt AC 47 ms 1852 KB
01_rnd_19.txt AC 49 ms 1844 KB
02_twothree_00.txt AC 50 ms 1916 KB
02_twothree_01.txt AC 51 ms 1744 KB
02_twothree_02.txt AC 48 ms 1856 KB
02_twothree_03.txt AC 48 ms 1852 KB
02_twothree_04.txt AC 48 ms 1844 KB
02_twothree_05.txt AC 48 ms 1840 KB
02_twothree_06.txt AC 48 ms 1848 KB
02_twothree_07.txt AC 48 ms 1840 KB
02_twothree_08.txt AC 48 ms 1844 KB
02_twothree_09.txt AC 49 ms 1936 KB
02_twothree_10.txt AC 50 ms 1856 KB
02_twothree_11.txt AC 49 ms 1852 KB
02_twothree_12.txt AC 50 ms 1844 KB
02_twothree_13.txt AC 48 ms 1940 KB
02_twothree_14.txt AC 46 ms 1848 KB
02_twothree_15.txt AC 51 ms 1788 KB
02_twothree_16.txt AC 51 ms 1848 KB
02_twothree_17.txt AC 48 ms 1936 KB
02_twothree_18.txt AC 49 ms 1848 KB
02_twothree_19.txt AC 50 ms 1880 KB