結果
| 問題 |
No.11 カードマッチ
|
| コンテスト | |
| ユーザー |
diginatu
|
| 提出日時 | 2014-11-24 01:46:38 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 535 bytes |
| コンパイル時間 | 867 ms |
| コンパイル使用メモリ | 113,144 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-12 01:38:19 |
| 合計ジャッジ時間 | 1,546 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
import std.stdio, std.string, std.conv
,std.array,std.algorithm, std.range
,std.math;
void main(){
auto W = readln().strip().to!long;
auto H = readln().strip().to!long;
auto N = readln().strip().to!int;
auto S = new int[](N);
auto K = new int[](N);
foreach(int i; 0 .. N) {
auto buf = readln().strip().split().map!(to!int)();
S[i] = buf[0];
K[i] = buf[1];
}
immutable sw = S.sort().uniq().array().length;
immutable kw = K.sort().uniq().array().length;
writeln( H*W - (W-sw)*(H-kw) - N);
}
diginatu