結果

問題 No.3648 Overbooked Meeting Rooms
コンテスト
ユーザー norioc
提出日時 2026-09-22 16:15:48
言語 Rust
(1.97.1 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
WA  
実行時間 -
コード長 798 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,513 ms
コンパイル使用メモリ 199,236 KB
実行使用メモリ 9,928 KB
最終ジャッジ日時 2026-09-22 16:15:52
合計ジャッジ時間 3,300 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#![allow(non_snake_case, unused_imports)]

use std::collections::{BinaryHeap, HashMap, HashSet};
use ac_library::{Additive, Min, Segtree};
use proconio::{input, marker::Usize1, marker::Chars};
use itertools::Itertools;

#[allow(unused_macros)]
macro_rules! d {
    ( $( $x:expr ),* $(,)? ) => {
        eprintln!(
            concat!( $( stringify!($x), "={:?} " ),* ),
            $( $x ),*
        );
    };
}

#[allow(dead_code)]
fn yn(b: bool) -> &'static str {
    if b { "Yes" } else { "No" }
}

fn main() {
    input! {
        N: usize,
        M: usize,
        A: [Usize1; N],
        B: [usize; M],
    }

    let freq = A.iter().counts();
    let ans = freq.iter()
        .map(|(&k, &v)| {
            (v - B[*k]).max(0)
        })
        .sum::<usize>();

    println!("{}", ans);
}
0