結果
| 問題 | No.3648 Overbooked Meeting Rooms |
| コンテスト | |
| ユーザー |
pengin_2000
|
| 提出日時 | 2026-08-28 21:31:15 |
| 言語 | C (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 0 ms / 2,000 ms |
| + 846µs | |
| コード長 | 399 bytes |
| 記録 | |
| コンパイル時間 | 506 ms |
| コンパイル使用メモリ | 38,912 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-28 21:31:37 |
| 合計ジャッジ時間 | 2,129 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include<stdio.h>
int a[502], b[502], cnt[502];
int main()
{
int n, m;
scanf("%d %d", &n, &m);
int i;
for (i = 0; i < n; i++)
scanf("%d", &a[i]);
for (i = 0; i < m; i++)
scanf("%d", &b[i]);
for (i = 0; i < m; i++)
cnt[i] = 0;
for (i = 0; i < n; i++)
cnt[--a[i]]++;
int ans = 0;
for (i = 0; i < m; i++)
if (cnt[i] > b[i])
ans += cnt[i] - b[i];
printf("%d\n", ans);
return 0;
}
pengin_2000