結果

問題 No.3794 Super Chat
コンテスト
ユーザー seseragii
提出日時 2026-11-21 03:52:54
言語 C++23(gcc16)
(gcc 16.2.0 + boost 1.92.0 + ACL)
コンパイル:
g++-16 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc16.so -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 534 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,361 ms
コンパイル使用メモリ 355,304 KB
実行使用メモリ 9,924 KB
最終ジャッジ日時 2026-11-21 03:53:05
合計ジャッジ時間 6,844 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 24 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;

int main(){
    int N; 
    int M; 
    cin >> N;
    cin >> M;
    string pyonpyon[N];
    int myonmyon[N];
    string suupachatto[M];
    for(int i=0; i<N; i++){
        cin >> pyonpyon[i] >> myonmyon[i];
    }
    for(int i=0; i<M; i++){
        cin >> suupachatto[i];
    }
    int total=0;
    for(int i=0; i<M; i++){
        for(int j=0; j<N; j++){
            if(suupachatto[i]==pyonpyon[j]){
                total+= myonmyon[j];
            }
        }
    }
    cout << total;
}
0