結果
問題 | No.504 ゲーム大会(ランキング) |
ユーザー |
|
提出日時 | 2018-09-13 22:47:14 |
言語 | Haskell (9.8.2) |
結果 |
TLE
|
実行時間 | - |
コード長 | 480 bytes |
コンパイル時間 | 4,444 ms |
コンパイル使用メモリ | 180,324 KB |
実行使用メモリ | 32,924 KB |
最終ジャッジ日時 | 2024-07-01 04:33:04 |
合計ジャッジ時間 | 8,237 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
13,752 KB |
testcase_01 | AC | 2 ms
6,940 KB |
testcase_02 | AC | 2 ms
6,940 KB |
testcase_03 | AC | 2 ms
6,944 KB |
testcase_04 | AC | 1 ms
6,944 KB |
testcase_05 | AC | 2 ms
6,944 KB |
testcase_06 | AC | 2 ms
6,944 KB |
testcase_07 | TLE | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/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 import Text.Printf (printf) import qualified Data.ByteString.Char8 as B readi :: B.ByteString -> Int readi bs | Just (n, _) <- B.readInt bs = n f :: Int -> [Int] -> Int -> [Int] f k xs y | y > k = y : xs | otherwise = xs main :: IO () main = do n <- readLn (k:as) <- replicateM n $ do readi <$> B.getLine let ss = scanl (f k) [] as let rs = fmap ((+ 1) . length) ss mapM_ print rs