結果

問題 No.11 カードマッチ
ユーザー tjnttjnt
提出日時 2021-07-28 12:03:18
言語 Haskell
(9.8.2)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 374 bytes
コンパイル時間 2,755 ms
コンパイル使用メモリ 161,492 KB
実行使用メモリ 9,192 KB
最終ジャッジ日時 2023-10-11 08:07:10
合計ジャッジ時間 2,531 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,660 KB
testcase_01 AC 2 ms
7,712 KB
testcase_02 AC 3 ms
7,864 KB
testcase_03 AC 2 ms
7,656 KB
testcase_04 AC 3 ms
8,608 KB
testcase_05 AC 3 ms
7,728 KB
testcase_06 AC 4 ms
8,628 KB
testcase_07 AC 4 ms
9,068 KB
testcase_08 AC 4 ms
9,192 KB
testcase_09 AC 4 ms
9,148 KB
testcase_10 AC 3 ms
8,488 KB
testcase_11 AC 4 ms
8,660 KB
testcase_12 AC 4 ms
8,784 KB
testcase_13 AC 4 ms
8,744 KB
testcase_14 AC 4 ms
8,936 KB
testcase_15 AC 4 ms
8,920 KB
testcase_16 AC 4 ms
8,948 KB
testcase_17 AC 4 ms
8,828 KB
testcase_18 AC 4 ms
8,936 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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

ソースコード

diff #

import qualified Data.IntSet as S

main :: IO ()
main = do
    w <- readLn :: IO Int
    h <- readLn :: IO Int
    n <- readLn :: IO Int
    sk <- map ((\[a,b] -> (a,b)) . (map read . words))
        . lines <$> getContents :: IO [(Int,Int)]
    let w' = S.size . S.fromList $ map fst sk
    let h' = S.size . S.fromList $ map snd sk
    print $ w * h - (w-w') * (h-h') - n
0