結果

問題 No.11 カードマッチ
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-10-30 01:32:16
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 69 ms / 5,000 ms
コード長 637 bytes
コンパイル時間 2,798 ms
コンパイル使用メモリ 108,500 KB
実行使用メモリ 24,744 KB
最終ジャッジ日時 2023-08-12 10:06:24
合計ジャッジ時間 4,763 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
22,636 KB
testcase_01 AC 65 ms
20,472 KB
testcase_02 AC 67 ms
24,656 KB
testcase_03 AC 65 ms
22,844 KB
testcase_04 AC 67 ms
24,644 KB
testcase_05 AC 67 ms
22,572 KB
testcase_06 AC 66 ms
24,560 KB
testcase_07 AC 68 ms
20,576 KB
testcase_08 AC 67 ms
24,568 KB
testcase_09 AC 69 ms
22,588 KB
testcase_10 AC 66 ms
22,756 KB
testcase_11 AC 66 ms
22,516 KB
testcase_12 AC 66 ms
22,624 KB
testcase_13 AC 65 ms
22,580 KB
testcase_14 AC 66 ms
24,668 KB
testcase_15 AC 66 ms
22,628 KB
testcase_16 AC 66 ms
22,636 KB
testcase_17 AC 66 ms
24,744 KB
testcase_18 AC 68 ms
22,696 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;

class No11{
    static void Main(){
        var W = Int64.Parse(Console.ReadLine());
        var H = Int64.Parse(Console.ReadLine());
        var N = Int64.Parse(Console.ReadLine());
        var wHashSet = new HashSet<long>();
        var hHashSet = new HashSet<long>();
        for(int i=0;i<N;++i){
            var line=Console.ReadLine().Split(' ').Select(x=>Int64.Parse(x)).ToArray();
            wHashSet.Add(line[0]);
            hHashSet.Add(line[1]);
        }
        var c=(W-wHashSet.Count())*(H-hHashSet.Count());
        Console.WriteLine(W*H-c-N);
    }
}
0