結果

問題 No.8016 unordered_mapなるたけ落とすマン
ユーザー threepipes_s
提出日時 2016-05-22 02:13:53
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 483 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 574 ms
コンパイル使用メモリ 94,744 KB
実行使用メモリ 10,240 KB
最終ジャッジ日時 2026-04-23 23:51:14
合計ジャッジ時間 6,891 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 43 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <stdio.h>
#include <map>
#include <vector>
#include <algorithm>
#include <utility>
#include <climits>
#include <queue>
using namespace std;
typedef pair<int, int> P;
typedef long long LL;

int main(){
    int n, m;
    long a;
    cin >> n >> m;
    map<int, long> mp;
    for(int i=0; i<n; i++){
        scanf("%d", &a);
        mp[a]++;
    }
    for(int i=0; i<m; i++){
        scanf("%d", &a);
        printf("%d ", mp[a]);
    }
    printf("\n");
}
0