結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー sekiya9311sekiya9311
提出日時 2016-05-22 09:50:36
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 1,217 bytes
コンパイル時間 1,018 ms
コンパイル使用メモリ 109,040 KB
実行使用メモリ 15,020 KB
最終ジャッジ日時 2024-04-16 12:16:04
合計ジャッジ時間 6,213 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
10,752 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 117 ms
9,508 KB
testcase_04 AC 134 ms
9,512 KB
testcase_05 AC 135 ms
9,508 KB
testcase_06 AC 149 ms
9,636 KB
testcase_07 AC 138 ms
9,512 KB
testcase_08 AC 140 ms
9,512 KB
testcase_09 AC 132 ms
9,508 KB
testcase_10 AC 146 ms
9,640 KB
testcase_11 AC 142 ms
9,640 KB
testcase_12 AC 131 ms
9,640 KB
testcase_13 AC 135 ms
9,512 KB
testcase_14 AC 133 ms
9,640 KB
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <bitset>
#include <ctime>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cassert>
#include <cstddef>
#include <iomanip>
#include <numeric>

#define REP(i,n) for(int (i)=0;(i)<(n);(i)++)
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define RREP(i,a) for(int (i)=(a)-1;(i)>=0;(i)--)
#define FORR(i,a,b) for(int (i)=(a)-1;(i)>=(b);(i)--)
#define MOD 1e9+7
#define PI acos(-1.0)
#define DEBUG(C) cout<<C<<endl;
#define PII pair<int,int>
#define PLL pair<long,long>
#define ALL(a) (a).begin(),(a).end()
#define SORT(a) sort((a).begin(),(a).end())

typedef long long LL;
typedef unsigned long long ULL;

using namespace std;

int main(void){
    unordered_map<long,long> ump;
    int N,M; cin>>N>>M;
    vector<long> nv(N),mv(M);
    REP(i,N) cin>>nv[i];
    REP(i,M){
        cin>>mv[i];
        ump[mv[i]]=0;
    }
    REP(i,N){
        if(ump.find(nv[i])!=ump.end()) ump[nv[i]]++;
    }
    REP(i,M) cout<<ump[mv[i]]<<" ";
}
0