結果
問題 | No.231 めぐるはめぐる (1) |
ユーザー | lvs7k |
提出日時 | 2018-09-15 21:04:14 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 12 ms / 1,000 ms |
コード長 | 517 bytes |
コンパイル時間 | 2,403 ms |
コンパイル使用メモリ | 171,320 KB |
実行使用メモリ | 11,552 KB |
最終ジャッジ日時 | 2023-09-25 08:49:22 |
合計ジャッジ時間 | 3,092 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 12 ms
11,552 KB |
testcase_01 | AC | 4 ms
9,016 KB |
testcase_02 | AC | 3 ms
8,108 KB |
testcase_03 | AC | 12 ms
11,232 KB |
testcase_04 | AC | 12 ms
11,416 KB |
testcase_05 | AC | 7 ms
11,260 KB |
testcase_06 | AC | 12 ms
11,252 KB |
testcase_07 | AC | 5 ms
9,076 KB |
testcase_08 | AC | 7 ms
11,240 KB |
testcase_09 | AC | 3 ms
6,956 KB |
testcase_10 | AC | 3 ms
7,040 KB |
testcase_11 | AC | 2 ms
7,076 KB |
testcase_12 | AC | 12 ms
11,208 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
ソースコード
module Main where import Control.Monad import Data.List (sortBy) expNeeded = 30000 * 100 desupena = 30000 exp_h :: [Int] -> Int exp_h [g, d] = g - d * desupena by (_, a) (_, b) = b `compare` a main :: IO () main = do n <- readLn ds <- fmap (zip [1..]) . replicateM n $ exp_h . fmap read . words <$> getLine let (no, eff) = head $ sortBy by ds if eff * 6 < expNeeded then putStrLn "NO" else do putStrLn "YES" replicateM_ 6 (print no)