結果
| 問題 |
No.231 めぐるはめぐる (1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-09 16:37:35 |
| 言語 | Haskell (9.10.1) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 543 bytes |
| コンパイル時間 | 249 ms |
| コンパイル使用メモリ | 149,888 KB |
| 最終ジャッジ日時 | 2024-11-14 20:03:29 |
| 合計ジャッジ時間 | 652 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main ( Main.hs, Main.o )
Main.hs:3:1: error: [GHC-87110]
Could not load module ‘Data.IntMap’.
It is a member of the hidden package ‘containers-0.6.8’.
Use -v to see a list of the files searched for.
|
3 | import qualified Data.IntMap as M
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ソースコード
import Control.Monad
import Data.List
import qualified Data.IntMap as M
solve gd n = M.filter (>=500000) $ M.fromList $ zip [1..n] $ map e gd where
e x = (x !! 0) - 30000 * (x !! 1)
output xs
| M.null xs = ["NO"]
| otherwise = "YES" : (map (show . fst) (gdList xs'))
where
xs' = M.toList xs
gdList a | length a >= 6 = take 6 a
| otherwise = gdList (a++a)
main = do
n <- readLn
gd <- map (map read . words) <$> replicateM n getLine
putStr $ unlines $ output $ solve gd n