結果
問題 | No.11 カードマッチ |
ユーザー |
![]() |
提出日時 | 2018-10-30 01:32:16 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 28 ms / 5,000 ms |
コード長 | 637 bytes |
コンパイル時間 | 1,065 ms |
コンパイル使用メモリ | 106,496 KB |
実行使用メモリ | 20,608 KB |
最終ジャッジ日時 | 2024-11-19 10:10:24 |
合計ジャッジ時間 | 2,224 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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); } }