結果
問題 | No.11 カードマッチ |
ユーザー |
|
提出日時 | 2017-09-19 01:20:18 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 5,000 ms |
コード長 | 268 bytes |
コンパイル時間 | 530 ms |
コンパイル使用メモリ | 64,884 KB |
実行使用メモリ | 9,676 KB |
最終ジャッジ日時 | 2024-11-08 02:44:07 |
合計ジャッジ時間 | 1,310 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main() | ^~~~
ソースコード
#include<iostream>using namespace std;long W,H,w,h;int s[1000001],k[1000001],n;main(){cin>>W>>H>>n;for(int i=0;i<n;i++){int S,K;cin>>S>>K;s[S]++,k[K]++;}for(int i=0;i++<W;)w+=!!s[i];for(int i=0;i++<H;)h+=!!k[i];cout<<W*H-(W-w)*(H-h)-n<<endl;}