結果
| 問題 | No.3648 Overbooked Meeting Rooms |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-28 22:26:53 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 538µs | |
| コード長 | 467 bytes |
| 記録 | |
| コンパイル時間 | 2,123 ms |
| コンパイル使用メモリ | 331,852 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-28 22:27:01 |
| 合計ジャッジ時間 | 3,792 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int n, m;
cin >> n >> m;
vector<int> a(n);
vector<int> b(m);
rep(i, n) cin >> a[i], a[i]--;
rep(i, m) cin >> b[i];
rep(i, n) b[a[i]]--;
int ans = 0;
rep(i, m) {
ans -= min(0, b[i]);
}
cout << ans << endl;
return 0;
}