Submission #171924


Source Code Expand

Copy
import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
  [r, c, d] <- map (read :: String -> Int) . words <$> getLine
  alist_org <- replicateM r getLine 
  let alist = map ( map (read :: String -> Int) . words ) alist_org
  -- print [r,c,d]
  -- print alist
  -- print $ concat alist
  -- print [0..(r*c)]
  let locate x = x `div` c + x `mod` c
      he_can_go x y = if odd d then if odd  (locate x) && locate x <= d then y else 0
                               else if even (locate x) && locate x <= d then y else 0
      result = zipWith he_can_go [0..(r*c)] (concat alist) 
  -- print result
  putStrLn . show $ maximum result

Submission Info

Submission Time
Task B - 謎の人物X
User smallgate
Language Haskell (GHC 7.4.1)
Score 60
Code Size 685 Byte
Status TLE
Exec Time 2128 ms
Memory 236572 KB

Judge Result

Set Name Sample Subtask1 Subtask2
Score / Max Score 0 / 0 60 / 60 0 / 40
Status
AC × 3
AC × 18
AC × 21
TLE × 9
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
Subtask1 sample_01.txt, sample_02.txt, sample_03.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt
Subtask2 subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt, subtask2_09.txt, subtask2_10.txt, subtask2_11.txt, subtask2_12.txt, subtask2_13.txt, subtask2_14.txt, subtask2_15.txt
Case Name Status Exec Time Memory
sample_01.txt AC 258 ms 1180 KB
sample_02.txt AC 31 ms 1292 KB
sample_03.txt AC 29 ms 1276 KB
subtask1_01.txt AC 30 ms 1308 KB
subtask1_02.txt AC 35 ms 1688 KB
subtask1_03.txt AC 31 ms 1688 KB
subtask1_04.txt AC 61 ms 3492 KB
subtask1_05.txt AC 32 ms 1796 KB
subtask1_06.txt AC 36 ms 2176 KB
subtask1_07.txt AC 72 ms 3216 KB
subtask1_08.txt AC 59 ms 2692 KB
subtask1_09.txt AC 59 ms 3460 KB
subtask1_10.txt AC 82 ms 4120 KB
subtask1_11.txt AC 75 ms 4100 KB
subtask1_12.txt AC 80 ms 4096 KB
subtask1_13.txt AC 77 ms 3836 KB
subtask1_14.txt AC 61 ms 3584 KB
subtask1_15.txt AC 73 ms 3612 KB
subtask2_01.txt AC 35 ms 2312 KB
subtask2_02.txt AC 38 ms 2204 KB
subtask2_03.txt AC 1812 ms 70656 KB
subtask2_04.txt AC 53 ms 3076 KB
subtask2_05.txt AC 228 ms 11268 KB
subtask2_06.txt AC 1023 ms 38916 KB
subtask2_07.txt TLE 2073 ms 123908 KB
subtask2_08.txt TLE 2128 ms 236572 KB
subtask2_09.txt TLE 2110 ms 203036 KB
subtask2_10.txt TLE 2108 ms 169096 KB
subtask2_11.txt TLE 2083 ms 177164 KB
subtask2_12.txt TLE 2101 ms 236568 KB
subtask2_13.txt TLE 2106 ms 168956 KB
subtask2_14.txt TLE 2108 ms 168996 KB
subtask2_15.txt TLE 2105 ms 168988 KB