結果
| 問題 | No.3794 Super Chat |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-12-03 22:12:45 |
| 言語 | Rust (1.99.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 124µs | |
| コード長 | 392 bytes |
| 記録 | |
| コンパイル時間 | 3,120 ms |
| コンパイル使用メモリ | 182,512 KB |
| 実行使用メモリ | 9,900 KB |
| 最終ジャッジ日時 | 2026-12-03 22:12:51 |
| 合計ジャッジ時間 | 5,682 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 35 |
ソースコード
use proconio::input;
use std::collections::HashMap;
fn main() {
input! {
n: usize,
m: usize,
sp: [(String, i64); n],
t: [String; m],
}
let mut mp = HashMap::<String, i64>::new();
for (s, p) in sp {
mp.insert(s, p);
}
let mut ans = 0_i64;
for s in t {
ans += *mp.get(&s).unwrap();
}
println!("{}", ans);
}