結果
問題 | No.182 新規性の虜 |
ユーザー |
![]() |
提出日時 | 2015-04-16 23:34:49 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 141 ms / 5,000 ms |
コード長 | 604 bytes |
コンパイル時間 | 12,537 ms |
コンパイル使用メモリ | 180,048 KB |
実行使用メモリ | 19,968 KB |
最終ジャッジ日時 | 2024-12-26 18:47:14 |
合計ジャッジ時間 | 14,644 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
コンパイルメッセージ
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
ソースコード
importControl.ApplicativeimportControl.MonadimportqualifiedData.ByteString.CharasBimportData.MaybefromJustimportData.ListimportText.PrintfimportDebug.Trace-- or readIntegerreadInts::BByteString->IntreadInts = map (fst . fromJust . B.readInt) . B.wordsgetInts::IOIntgetInts = liftM readInts B.getLinemain = do[n] <- getIntsxs <- getIntsprint $ solve $ Data.List.sort xswheresolve xs = sub xs 0 2sub [] _ c = to csub (x:xs) a c = if x == a then sub xs a (c+1)else to c + sub xs x 1to c = if c > 1 then 0 else 1