結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー どららどらら
提出日時 2016-05-22 00:34:36
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 216 ms / 1,000 ms
コード長 765 bytes
コンパイル時間 1,161 ms
コンパイル使用メモリ 86,076 KB
実行使用メモリ 9,728 KB
最終ジャッジ日時 2024-04-16 11:36:27
合計ジャッジ時間 12,154 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 205 ms
9,600 KB
testcase_04 AC 213 ms
9,600 KB
testcase_05 AC 214 ms
9,600 KB
testcase_06 AC 215 ms
9,472 KB
testcase_07 AC 213 ms
9,728 KB
testcase_08 AC 210 ms
9,472 KB
testcase_09 AC 216 ms
9,600 KB
testcase_10 AC 211 ms
9,600 KB
testcase_11 AC 210 ms
9,600 KB
testcase_12 AC 214 ms
9,600 KB
testcase_13 AC 209 ms
9,472 KB
testcase_14 AC 211 ms
9,600 KB
testcase_15 AC 207 ms
9,600 KB
testcase_16 AC 214 ms
9,600 KB
testcase_17 AC 214 ms
9,600 KB
testcase_18 AC 214 ms
9,600 KB
testcase_19 AC 209 ms
9,472 KB
testcase_20 AC 212 ms
9,600 KB
testcase_21 AC 209 ms
9,600 KB
testcase_22 AC 211 ms
9,600 KB
testcase_23 AC 212 ms
9,600 KB
testcase_24 AC 211 ms
9,600 KB
testcase_25 AC 208 ms
9,600 KB
testcase_26 AC 208 ms
9,600 KB
testcase_27 AC 214 ms
9,600 KB
testcase_28 AC 203 ms
9,600 KB
testcase_29 AC 208 ms
9,600 KB
testcase_30 AC 205 ms
9,344 KB
testcase_31 AC 203 ms
9,600 KB
testcase_32 AC 200 ms
9,600 KB
testcase_33 AC 201 ms
9,600 KB
testcase_34 AC 202 ms
9,600 KB
testcase_35 AC 200 ms
9,600 KB
testcase_36 AC 196 ms
9,472 KB
testcase_37 AC 198 ms
9,472 KB
testcase_38 AC 200 ms
9,472 KB
testcase_39 AC 201 ms
9,600 KB
testcase_40 AC 198 ms
9,472 KB
testcase_41 AC 2 ms
5,376 KB
testcase_42 AC 2 ms
5,376 KB
testcase_43 AC 2 ms
5,376 KB
testcase_44 AC 19 ms
5,376 KB
testcase_45 AC 16 ms
5,376 KB
testcase_46 AC 17 ms
5,376 KB
testcase_47 AC 192 ms
7,296 KB
testcase_48 AC 172 ms
7,552 KB
testcase_49 AC 185 ms
7,680 KB
testcase_50 AC 160 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <iostream>
#include <queue>
#include <list>
#include <stack>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).end()
typedef long long ll;

int main(){
  ios::sync_with_stdio(false);
  int N, M;
  cin >> N >> M;
  map<ll,ll> A;
  rep(i,N){
    ll a;
    cin >> a;
    A[a]++;
  }
  rep(i,M){
    ll b;
    cin >> b;
    if(i!=0) cout << " ";
    cout << A[b];
  }
  cout << endl;
  return 0;
}
0