結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー たこしたこし
提出日時 2018-02-20 16:17:30
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 154 ms / 1,000 ms
コード長 743 bytes
コンパイル時間 1,515 ms
コンパイル使用メモリ 150,944 KB
実行使用メモリ 11,452 KB
最終ジャッジ日時 2023-09-26 17:24:39
合計ジャッジ時間 13,536 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 139 ms
11,136 KB
testcase_04 AC 154 ms
11,184 KB
testcase_05 AC 154 ms
11,132 KB
testcase_06 AC 150 ms
11,132 KB
testcase_07 AC 151 ms
11,248 KB
testcase_08 AC 150 ms
11,248 KB
testcase_09 AC 146 ms
11,196 KB
testcase_10 AC 148 ms
11,200 KB
testcase_11 AC 150 ms
11,452 KB
testcase_12 AC 145 ms
11,148 KB
testcase_13 AC 147 ms
11,272 KB
testcase_14 AC 149 ms
11,184 KB
testcase_15 AC 144 ms
11,168 KB
testcase_16 AC 144 ms
11,200 KB
testcase_17 AC 142 ms
11,124 KB
testcase_18 AC 147 ms
11,184 KB
testcase_19 AC 144 ms
11,204 KB
testcase_20 AC 139 ms
11,244 KB
testcase_21 AC 140 ms
11,164 KB
testcase_22 AC 138 ms
11,196 KB
testcase_23 AC 139 ms
11,324 KB
testcase_24 AC 135 ms
11,124 KB
testcase_25 AC 137 ms
11,128 KB
testcase_26 AC 132 ms
11,180 KB
testcase_27 AC 129 ms
11,248 KB
testcase_28 AC 131 ms
11,328 KB
testcase_29 AC 129 ms
11,220 KB
testcase_30 AC 131 ms
11,320 KB
testcase_31 AC 128 ms
11,128 KB
testcase_32 AC 126 ms
11,156 KB
testcase_33 AC 121 ms
11,180 KB
testcase_34 AC 122 ms
11,164 KB
testcase_35 AC 121 ms
11,112 KB
testcase_36 AC 121 ms
11,104 KB
testcase_37 AC 116 ms
11,368 KB
testcase_38 AC 119 ms
11,132 KB
testcase_39 AC 118 ms
11,344 KB
testcase_40 AC 117 ms
11,096 KB
testcase_41 AC 2 ms
4,380 KB
testcase_42 AC 1 ms
4,380 KB
testcase_43 AC 2 ms
4,380 KB
testcase_44 AC 11 ms
4,380 KB
testcase_45 AC 10 ms
4,380 KB
testcase_46 AC 11 ms
4,376 KB
testcase_47 AC 128 ms
8,316 KB
testcase_48 AC 148 ms
8,748 KB
testcase_49 AC 143 ms
8,676 KB
testcase_50 AC 113 ms
4,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define INF 100000000
#define YJ 1145141919
#define INF_INT_MAX 2147483647
#define INF_LL_MAX 9223372036854775807
#define EPS 1e-10
#define Pi acos(-1)
#define LL long long
#define ULL unsigned long long
#define LD long double

const int MAX_N = 100005;
const int MAX_M = 100005;

int N, M;
LL A[MAX_N], B[MAX_M];

map<LL, int> m;

int main()
{
  cin >> N >> M;
  for(unsigned int index = 0; index < N; index++) {
    cin >> A[index];
    m[A[index]]++;
  }
  for(unsigned int index = 0; index < M; index++) {
    cin >> B[index];
  }

  for(unsigned int index = 0; index < M; index++) {
    cout << m[B[index]];
    if(index < M-1) {
      cout << " ";
    }
  }
  cout << endl;

  return 0;
}
0