結果

問題 No.231 めぐるはめぐる (1)
ユーザー aimyaimy
提出日時 2017-04-20 16:31:16
言語 Haskell
(9.8.2)
結果
AC  
実行時間 12 ms / 1,000 ms
コード長 363 bytes
コンパイル時間 891 ms
コンパイル使用メモリ 165,808 KB
実行使用メモリ 11,440 KB
最終ジャッジ日時 2023-09-27 03:43:50
合計ジャッジ時間 2,293 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
11,400 KB
testcase_01 AC 4 ms
9,048 KB
testcase_02 AC 3 ms
8,368 KB
testcase_03 AC 12 ms
11,340 KB
testcase_04 AC 12 ms
11,440 KB
testcase_05 AC 7 ms
11,348 KB
testcase_06 AC 7 ms
11,356 KB
testcase_07 AC 5 ms
9,212 KB
testcase_08 AC 7 ms
11,336 KB
testcase_09 AC 3 ms
7,188 KB
testcase_10 AC 3 ms
7,252 KB
testcase_11 AC 3 ms
7,264 KB
testcase_12 AC 7 ms
11,356 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

import Data.List
import Data.Ord

main = do
 gds <- map (map read . words) . tail . lines <$> getContents
 let r = meguru gds
 putStr (maybe "NO\n" (unlines . ("YES":) . map show . replicate 6) r)

meguru gds = if (snd maxcp) * 6 >= 3000000 then Just (fst maxcp) else Nothing 
 where maxcp = maximumBy (comparing snd) $ zip [1..] (map (\[g,d] -> g - 30000*d) gds)
0