結果

問題 No.11 カードマッチ
ユーザー kuuso1kuuso1
提出日時 2016-08-27 15:41:38
言語 F#
(.NET 7)
結果
AC  
実行時間 99 ms / 5,000 ms
コード長 781 bytes
コンパイル時間 5,800 ms
コンパイル使用メモリ 167,964 KB
実行使用メモリ 27,020 KB
最終ジャッジ日時 2023-08-08 05:00:07
合計ジャッジ時間 9,695 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
26,904 KB
testcase_01 AC 96 ms
24,888 KB
testcase_02 AC 95 ms
26,940 KB
testcase_03 AC 94 ms
24,880 KB
testcase_04 AC 95 ms
24,844 KB
testcase_05 AC 94 ms
26,836 KB
testcase_06 AC 96 ms
24,888 KB
testcase_07 AC 95 ms
24,880 KB
testcase_08 AC 94 ms
24,928 KB
testcase_09 AC 96 ms
27,020 KB
testcase_10 AC 99 ms
26,916 KB
testcase_11 AC 98 ms
24,852 KB
testcase_12 AC 96 ms
25,056 KB
testcase_13 AC 95 ms
22,948 KB
testcase_14 AC 94 ms
22,900 KB
testcase_15 AC 95 ms
27,004 KB
testcase_16 AC 96 ms
24,900 KB
testcase_17 AC 94 ms
22,916 KB
testcase_18 AC 96 ms
24,816 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System

let ri () = stdin.ReadLine() |> int
let ria () = stdin.ReadLine().Split() |> Array.map int

type Sol() =
    member this.Solve() = 
        let W = stdin.ReadLine() |> int64
        let H = stdin.ReadLine() |> int64
        let N = stdin.ReadLine() |> int
        let mutable (L : list<int*int> ) = []
        
        for i in 1..(int N) do
            let (s,k) = (ria () ) |> (fun ar -> (ar.[0], ar.[1]) )
            L <- (s,k) :: L
        
        let wu = L |> List.map fst |> List.distinct |> List.length |> int64
        let hu = L |> List.map snd |> List.distinct |> List.length |> int64
        
        //printfn "%d %d %d %d" W wu H hu
        
        W*H - (W-wu)*(H-hu) - (int64 N) |> printfn "%d"
        
        
let mySol = new Sol()
mySol.Solve()
0