結果
| 問題 | No.3533 Difficult Counting Problem? |
| コンテスト | |
| ユーザー |
kou_kkk
|
| 提出日時 | 2026-11-24 12:26:40 |
| 言語 | Haskell (9.14.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 6 ms / 2,000 ms |
| + 605µs | |
| コード長 | 393 bytes |
| 記録 | |
| コンパイル時間 | 9,058 ms |
| コンパイル使用メモリ | 188,032 KB |
| 実行使用メモリ | 9,984 KB |
| 最終ジャッジ日時 | 2026-11-24 12:26:52 |
| 合計ジャッジ時間 | 11,154 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 17 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/environments/default
[1 of 2] Compiling Main ( Main.hs, Main.o )
Main.hs:9:7: warning: [GHC-63394] [-Wx-partial]
In the use of ‘tail’
(imported from Prelude, but defined in GHC.Internal.List):
"This is a partial function, it throws an error on empty lists. Replace it with 'drop' 1, or use pattern matching or 'GHC.Internal.Data.List.uncons' instead. Consider refactoring to use "Data.List.NonEmpty"."
|
9 | . tail
| ^^^^
[2 of 2] Linking a.out
ソースコード
module Main where
type Input = [Int]
type Output = [Int]
parse :: String -> Input
parse =
map read
. tail
. lines
solve :: Input -> Output
solve input =
let
f 1 = 1
f _ = 0
in
map f input
render :: Output -> String
render =
unlines
. map show
main :: IO ()
main =
interact
( render
. solve
. parse
)
kou_kkk