結果

問題 No.11 カードマッチ
ユーザー kuuso1kuuso1
提出日時 2016-08-27 15:34:25
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 730 bytes
コンパイル時間 6,740 ms
コンパイル使用メモリ 198,788 KB
実行使用メモリ 35,624 KB
最終ジャッジ日時 2024-04-26 06:25:32
合計ジャッジ時間 14,415 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 339 ms
35,276 KB
testcase_01 AC 340 ms
34,944 KB
testcase_02 AC 343 ms
35,456 KB
testcase_03 WA -
testcase_04 AC 340 ms
35,320 KB
testcase_05 AC 342 ms
35,408 KB
testcase_06 WA -
testcase_07 AC 340 ms
35,244 KB
testcase_08 WA -
testcase_09 AC 346 ms
35,384 KB
testcase_10 AC 342 ms
35,108 KB
testcase_11 AC 343 ms
35,484 KB
testcase_12 AC 346 ms
35,228 KB
testcase_13 AC 346 ms
35,244 KB
testcase_14 AC 342 ms
35,360 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (230 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/

ソースコード

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 hu = L |> List.map fst |> List.distinct |> List.length |> int64
        let wu = L |> List.map snd |> List.distinct |> List.length |> int64
        
        W*H - (W-wu)*(H-hu) - (int64 N) |> printfn "%d"
        
        
let mySol = new Sol()
mySol.Solve()
0