結果
問題 | No.504 ゲーム大会(ランキング) |
ユーザー | lvs7k |
提出日時 | 2018-09-13 22:47:14 |
言語 | Haskell (9.8.2) |
結果 |
TLE
|
実行時間 | - |
コード長 | 480 bytes |
コンパイル時間 | 3,269 ms |
コンパイル使用メモリ | 166,192 KB |
実行使用メモリ | 33,972 KB |
最終ジャッジ日時 | 2023-09-13 20:01:07 |
合計ジャッジ時間 | 7,113 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 3 ms
7,552 KB |
testcase_01 | AC | 3 ms
7,636 KB |
testcase_02 | AC | 3 ms
7,656 KB |
testcase_03 | AC | 3 ms
7,580 KB |
testcase_04 | AC | 3 ms
7,668 KB |
testcase_05 | AC | 3 ms
7,624 KB |
testcase_06 | AC | 3 ms
7,480 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.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 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