結果
| 問題 | No.11 カードマッチ |
| コンテスト | |
| ユーザー |
mban
|
| 提出日時 | 2016-11-14 19:58:47 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 768 bytes |
| 記録 | |
| コンパイル時間 | 802 ms |
| コンパイル使用メモリ | 106,496 KB |
| 実行使用メモリ | 20,224 KB |
| 最終ジャッジ日時 | 2024-11-26 01:17:03 |
| 合計ジャッジ時間 | 1,926 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 10 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}
mban