結果
| 問題 | No.3648 Overbooked Meeting Rooms |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-28 21:31:35 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 437µs | |
| コード長 | 470 bytes |
| 記録 | |
| コンパイル時間 | 1,150 ms |
| コンパイル使用メモリ | 210,812 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-28 21:31:51 |
| 合計ジャッジ時間 | 2,776 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define REP(i,n) for(ll i=0;i<ll(n);i++)
int main(void){
cin.tie(nullptr); ios_base::sync_with_stdio(false);
ll i,j;
ll N,M;
cin >> N >> M;
vector<ll> a(N+1),b(M+1),c(M+1);
for(i=1;i<=N;i++){
cin >> a[i];
c[a[i]]++;
}
ll ans=0;
for(i=1;i<=M;i++){
cin >> b[i];
if(c[i]>b[i]) ans+=c[i]-b[i];
}
cout << ans << endl;
return 0;
}