結果

問題 No.73 helloworld
ユーザー momen999momen999
提出日時 2017-06-18 09:11:39
言語 Haskell
(9.8.2)
結果
TLE  
実行時間 -
コード長 579 bytes
コンパイル時間 9,386 ms
コンパイル使用メモリ 173,824 KB
実行使用メモリ 14,624 KB
最終ジャッジ日時 2024-04-09 19:21:03
合計ジャッジ時間 16,156 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
14,624 KB
testcase_01 AC 1 ms
6,812 KB
testcase_02 AC 1 ms
6,816 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 1 ms
6,940 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 1 ms
6,944 KB
testcase_10 AC 1 ms
6,944 KB
testcase_11 AC 1 ms
6,940 KB
testcase_12 TLE -
testcase_13 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

import Control.Monad

--
solve as = hsum * (maxl 0 2) * (maxo 0 1)
    where
        maxl m i    | i == l    = m
                    | otherwise = maxl (max m (((i * (i - 1)) `div` 2) * (l - i))) (i + 1)
        maxo m i    | i == o    = m
                    | otherwise = maxo (max m (i * (o - i))) (i + 1)
        hsum = foldr (*) 1 hewrd
        hewrd = [d,e,h,r,w]
        d = as !! 3
        e = as !! 4
        h = as !! 7
        l = as !! 11
        o = as !! 14
        r = as !! 17
        w = as !! 22
--

main = do
    as <- replicateM 26 readLn
    print $ solve as
0