結果

問題 No.11 カードマッチ
ユーザー mbanmban
提出日時 2016-11-14 19:58:47
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 768 bytes
コンパイル時間 2,317 ms
コンパイル使用メモリ 102,700 KB
実行使用メモリ 24,812 KB
最終ジャッジ日時 2023-08-17 06:44:57
合計ジャッジ時間 4,384 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
22,720 KB
testcase_01 AC 63 ms
22,596 KB
testcase_02 AC 63 ms
22,700 KB
testcase_03 AC 61 ms
22,672 KB
testcase_04 WA -
testcase_05 AC 60 ms
20,576 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 63 ms
22,536 KB
testcase_16 AC 62 ms
20,696 KB
testcase_17 AC 62 ms
22,648 KB
testcase_18 AC 63 ms
24,672 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.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class Magatro
{
    
    static void Main()
    {
        int W = int.Parse(Console.ReadLine());
        int H = int.Parse(Console.ReadLine());
        int N = int.Parse(Console.ReadLine());
        HashSet<int> HashS = new HashSet<int>(),HashK=new HashSet<int>();
        for(int i = 0; i < N; i++)
        {
           int[] q = Console.ReadLine().Split(' ').Select(s=>int.Parse(s)).ToArray();
            HashS.Add(q[0]);
            HashK.Add(q[1]);
        }
        long All = W * H;
        long scnt = W - HashS.Count;
        long kcnt = H - HashK.Count;
        long cnt = scnt * kcnt + N;
        Console.WriteLine(All - cnt);
    }    

}
0