結果
| 問題 | No.3794 Super Chat |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-11-15 22:53:33 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 2 ms / 2,000 ms |
| + 6µs | |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 1,495 ms |
| コンパイル使用メモリ | 191,164 KB |
| 実行使用メモリ | 9,868 KB |
| 最終ジャッジ日時 | 2026-11-15 22:53:37 |
| 合計ジャッジ時間 | 4,354 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 35 |
ソースコード
#include<iostream>
#include<vector>
#include<map>
#include<algorithm>
using namespace std;
using ll = long long;
int main(void){
int n, m; cin >> n >> m;
map<string, ll> cnt;
while(n--){
string s; ll p; cin >> s >> p;
cnt[s]=p;
}
ll ans=0;
while(m--){
string s; cin >> s;
ans+=cnt[s];
}
cout << ans << endl;
return 0;
}