結果
| 問題 |
No.11 カードマッチ
|
| コンテスト | |
| ユーザー |
h_noson
|
| 提出日時 | 2016-03-15 15:12:50 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 627 bytes |
| コンパイル時間 | 559 ms |
| コンパイル使用メモリ | 53,960 KB |
| 最終ジャッジ日時 | 2024-11-14 19:35:47 |
| 合計ジャッジ時間 | 1,160 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:24:12: error: ‘accumulate’ was not declared in this scope
24 | type = accumulate(a+1,a+w+1,0LL);
| ^~~~~~~~~~
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define RREP(i,s,e) for (i = e-1; i >= s; i--)
#define rrep(i,n) RREP(i,0,n)
#define REP(i,s,e) for (i = s; i < e; i++)
#define rep(i,n) REP(i,0,n)
#define INF 1e8
typedef long long ll;
int main() {
ll i, w, h, n, type, num;
bool a[1000001] {}, b[1000001] {};
cin >> w >> h >> n;
rep (i,n) {
int s, k;
cin >> s >> k;
a[s] = true;
b[k] = true;
}
type = accumulate(a+1,a+w+1,0LL);
num = accumulate(b+1,b+h+1,0LL);
cout << type * h + num * w - type * num - n << endl;
return 0;
}
h_noson