提出 #2248876


ソースコード 拡げる

module Main where

import qualified Data.Map as Map
import Control.Monad

main :: IO ()
main = do
    n <- read <$> getLine
    s <- replicateM n getLine
    m <- read <$> getLine
    t <- replicateM m getLine
    print $ solve s t

solve :: [String] -> [String] -> Int
solve s t =
    let l = ((\x -> (x, 1)) <$> s) ++ ((\x -> (x, -1)) <$> t)
        m = Map.fromListWith (+) l
    in  Map.foldr max 0 $ Map.filter (>0) m

提出情報

提出日時
問題 B - Two Colors Card Game
ユーザ winjii
言語 Haskell (GHC 7.10.3)
得点 200
コード長 439 Byte
結果 AC
実行時間 1 ms
メモリ 636 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 4
AC × 11
セット名 テストケース
Sample example_0, example_1, example_2, example_3
All example_0, example_1, example_2, example_3, rand_0, rand_1, rand_2, rand_3, rand_4, rand_5, rand_6
ケース名 結果 実行時間 メモリ
example_0 AC 1 ms 508 KiB
example_1 AC 1 ms 508 KiB
example_2 AC 1 ms 508 KiB
example_3 AC 1 ms 508 KiB
rand_0 AC 1 ms 508 KiB
rand_1 AC 1 ms 636 KiB
rand_2 AC 1 ms 636 KiB
rand_3 AC 1 ms 636 KiB
rand_4 AC 1 ms 508 KiB
rand_5 AC 1 ms 636 KiB
rand_6 AC 1 ms 508 KiB