結果
| 問題 | No.11 カードマッチ | 
| コンテスト | |
| ユーザー |  kuuso1 | 
| 提出日時 | 2016-08-27 15:41:38 | 
| 言語 | F# (F# 4.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 347 ms / 5,000 ms | 
| コード長 | 781 bytes | 
| コンパイル時間 | 14,743 ms | 
| コンパイル使用メモリ | 198,128 KB | 
| 実行使用メモリ | 35,780 KB | 
| 最終ジャッジ日時 | 2024-11-08 10:47:05 | 
| 合計ジャッジ時間 | 22,389 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 19 | 
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (384 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
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()
            
            
            
        