結果

問題 No.231 めぐるはめぐる (1)
ユーザー mazeppa1108mazeppa1108
提出日時 2015-06-26 23:07:18
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 438 bytes
コンパイル時間 2,397 ms
コンパイル使用メモリ 160,184 KB
実行使用メモリ 8,072 KB
最終ジャッジ日時 2023-09-22 01:31:06
合計ジャッジ時間 4,270 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 3 ms
7,336 KB
testcase_02 AC 3 ms
7,264 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 3 ms
7,628 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 3 ms
7,044 KB
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 Control.Applicative
import Control.Monad

main = do
     n <- readLn
     exp <- (map . map) read . map words <$> replicateM n getLine 
     let exp' =  take 6 . reverse . sort $ map (\x -> (fst x, snd x !! 0 - 30000 * (snd x !! 1))) $ zip [1..] exp
     if foldl' (\acc x -> acc + snd x ) 0 exp' >= 3000000
        then do 
          putStrLn "YES"
          mapM_ print $ map fst exp'
        else putStrLn "NO"
0