結果

問題 No.504 ゲーム大会(ランキング)
ユーザー くれちーくれちー
提出日時 2017-04-26 22:50:32
言語 Haskell
(9.8.2)
結果
AC  
実行時間 372 ms / 2,000 ms
コード長 241 bytes
コンパイル時間 2,932 ms
コンパイル使用メモリ 160,476 KB
実行使用メモリ 57,916 KB
最終ジャッジ日時 2023-10-11 14:09:58
合計ジャッジ時間 7,227 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,944 KB
testcase_01 AC 3 ms
6,920 KB
testcase_02 AC 2 ms
7,000 KB
testcase_03 AC 3 ms
7,024 KB
testcase_04 AC 2 ms
6,984 KB
testcase_05 AC 2 ms
6,944 KB
testcase_06 AC 3 ms
6,916 KB
testcase_07 AC 362 ms
57,892 KB
testcase_08 AC 362 ms
57,852 KB
testcase_09 AC 361 ms
57,852 KB
testcase_10 AC 362 ms
57,848 KB
testcase_11 AC 363 ms
57,900 KB
testcase_12 AC 272 ms
31,784 KB
testcase_13 AC 262 ms
31,804 KB
testcase_14 AC 372 ms
57,916 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 Control.Monad (replicateM, mapM_)

main :: IO ()
main = do
    n <- readLn
    (k : as) <- replicateM n readLn
    mapM_ print $ solve k as

solve :: Integral a => a -> [a] -> [a]
solve k = scanl (\x y -> if y > k then x + 1 else x) 1
0