Submission #123065


Source Code Expand

Copy
import Data.List

main :: IO ()
main = do nk <- getLine
          rs <- getLine
          print $ maximum (map (foldl acc 0) (getPermitations rs nk)) where
              acc :: Float -> String -> Float
              acc n m = (n + (read m)) / 2
              getPermitations :: String -> String -> [[String]]
              getPermitations rs nk = map (take (getSndInt nk)) (permutations (words rs)) where
                  getSndInt :: String -> Int
                  getSndInt nk =  read $ last $ words nk

Submission Info

Submission Time
Task C - AtCoderプログラミング講座
User orumin
Language Haskell (GHC 7.4.1)
Score 0
Code Size 519 Byte
Status TLE
Exec Time 2154 ms
Memory 3368 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 3
TLE × 31
Set Name Test Cases
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 79 ms 1312 KB
00_sample_02.txt AC 25 ms 1312 KB
00_sample_03.txt TLE 2030 ms 3232 KB
00_sample_04.txt TLE 2030 ms 3232 KB
test_01.txt AC 28 ms 1312 KB
test_02.txt TLE 2029 ms 3104 KB
test_03.txt TLE 2029 ms 3292 KB
test_04.txt TLE 2030 ms 3316 KB
test_05.txt TLE 2029 ms 3104 KB
test_06.txt TLE 2031 ms 3240 KB
test_07.txt TLE 2031 ms 3312 KB
test_08.txt TLE 2029 ms 3100 KB
test_09.txt TLE 2029 ms 3236 KB
test_10.txt TLE 2030 ms 3280 KB
test_11.txt TLE 2030 ms 3356 KB
test_12.txt TLE 2030 ms 3356 KB
test_13.txt TLE 2029 ms 2848 KB
test_14.txt TLE 2030 ms 3292 KB
test_15.txt TLE 2030 ms 3316 KB
test_16.txt TLE 2031 ms 3368 KB
test_17.txt TLE 2030 ms 3356 KB
test_18.txt TLE 2029 ms 2848 KB
test_19.txt TLE 2030 ms 3360 KB
test_20.txt TLE 2030 ms 3292 KB
test_21.txt TLE 2030 ms 3356 KB
test_22.txt TLE 2030 ms 3360 KB
test_23.txt TLE 2030 ms 3356 KB
test_24.txt TLE 2030 ms 3236 KB
test_25.txt TLE 2030 ms 2976 KB
test_26.txt TLE 2030 ms 3040 KB
test_27.txt TLE 2030 ms 3240 KB
test_28.txt TLE 2154 ms 3232 KB
test_29.txt TLE 2030 ms 2784 KB
test_30.txt TLE 2031 ms 3360 KB