結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー hgotohgoto
提出日時 2020-09-26 13:56:50
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 65 ms / 1,000 ms
コード長 412 bytes
コンパイル時間 4,434 ms
コンパイル使用メモリ 227,504 KB
実行使用メモリ 12,560 KB
最終ジャッジ日時 2023-09-11 10:32:03
合計ジャッジ時間 10,760 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,356 KB
testcase_01 AC 2 ms
4,356 KB
testcase_02 AC 2 ms
4,356 KB
testcase_03 AC 56 ms
12,336 KB
testcase_04 AC 65 ms
12,336 KB
testcase_05 AC 58 ms
12,288 KB
testcase_06 AC 60 ms
12,360 KB
testcase_07 AC 56 ms
12,276 KB
testcase_08 AC 49 ms
12,408 KB
testcase_09 AC 49 ms
12,480 KB
testcase_10 AC 50 ms
12,284 KB
testcase_11 AC 48 ms
12,272 KB
testcase_12 AC 49 ms
12,380 KB
testcase_13 AC 50 ms
12,356 KB
testcase_14 AC 49 ms
12,352 KB
testcase_15 AC 49 ms
12,492 KB
testcase_16 AC 49 ms
12,356 KB
testcase_17 AC 50 ms
12,428 KB
testcase_18 AC 49 ms
12,524 KB
testcase_19 AC 49 ms
12,352 KB
testcase_20 AC 48 ms
12,412 KB
testcase_21 AC 49 ms
12,324 KB
testcase_22 AC 47 ms
12,288 KB
testcase_23 AC 47 ms
12,356 KB
testcase_24 AC 48 ms
12,364 KB
testcase_25 AC 46 ms
12,408 KB
testcase_26 AC 47 ms
12,348 KB
testcase_27 AC 45 ms
12,284 KB
testcase_28 AC 46 ms
12,432 KB
testcase_29 AC 48 ms
12,412 KB
testcase_30 AC 46 ms
12,560 KB
testcase_31 AC 45 ms
12,264 KB
testcase_32 AC 45 ms
12,328 KB
testcase_33 AC 46 ms
12,480 KB
testcase_34 AC 45 ms
12,544 KB
testcase_35 AC 44 ms
12,480 KB
testcase_36 AC 45 ms
12,492 KB
testcase_37 AC 44 ms
12,280 KB
testcase_38 AC 46 ms
12,348 KB
testcase_39 AC 44 ms
12,428 KB
testcase_40 AC 44 ms
12,412 KB
testcase_41 AC 2 ms
4,356 KB
testcase_42 AC 2 ms
4,380 KB
testcase_43 AC 2 ms
4,356 KB
testcase_44 AC 5 ms
4,352 KB
testcase_45 AC 5 ms
4,356 KB
testcase_46 AC 5 ms
4,352 KB
testcase_47 AC 35 ms
7,744 KB
testcase_48 AC 42 ms
12,320 KB
testcase_49 AC 43 ms
12,404 KB
testcase_50 AC 37 ms
4,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  gp_hash_table<long long, int> mp;
  while (n--) {
    long long a;
    cin >> a;
    mp[a]++;
  }
  while (m--) {
    long long b;
    cin >> b;
    cout << mp[b] << (m > 0 ? ' ' : '\n');
  }
  return 0;
}
0