結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー TlapesiumTlapesium
提出日時 2020-08-16 19:43:12
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 43 ms / 1,000 ms
コード長 785 bytes
コンパイル時間 3,013 ms
コンパイル使用メモリ 243,976 KB
実行使用メモリ 12,652 KB
最終ジャッジ日時 2024-04-27 04:59:59
合計ジャッジ時間 7,125 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 37 ms
12,608 KB
testcase_04 AC 41 ms
12,452 KB
testcase_05 AC 41 ms
12,528 KB
testcase_06 AC 41 ms
12,548 KB
testcase_07 AC 42 ms
12,520 KB
testcase_08 AC 42 ms
12,448 KB
testcase_09 AC 41 ms
12,636 KB
testcase_10 AC 40 ms
12,524 KB
testcase_11 AC 40 ms
12,520 KB
testcase_12 AC 42 ms
12,516 KB
testcase_13 AC 40 ms
12,492 KB
testcase_14 AC 40 ms
12,576 KB
testcase_15 AC 41 ms
12,496 KB
testcase_16 AC 40 ms
12,424 KB
testcase_17 AC 42 ms
12,596 KB
testcase_18 AC 40 ms
12,548 KB
testcase_19 AC 43 ms
12,520 KB
testcase_20 AC 38 ms
12,524 KB
testcase_21 AC 41 ms
12,520 KB
testcase_22 AC 38 ms
12,544 KB
testcase_23 AC 38 ms
12,592 KB
testcase_24 AC 40 ms
12,536 KB
testcase_25 AC 39 ms
12,552 KB
testcase_26 AC 39 ms
12,452 KB
testcase_27 AC 37 ms
12,608 KB
testcase_28 AC 38 ms
12,548 KB
testcase_29 AC 38 ms
12,544 KB
testcase_30 AC 37 ms
12,452 KB
testcase_31 AC 38 ms
12,616 KB
testcase_32 AC 39 ms
12,612 KB
testcase_33 AC 37 ms
12,652 KB
testcase_34 AC 38 ms
12,516 KB
testcase_35 AC 38 ms
12,520 KB
testcase_36 AC 36 ms
12,512 KB
testcase_37 AC 35 ms
12,508 KB
testcase_38 AC 37 ms
12,452 KB
testcase_39 AC 37 ms
12,488 KB
testcase_40 AC 37 ms
12,520 KB
testcase_41 AC 2 ms
6,940 KB
testcase_42 AC 1 ms
6,940 KB
testcase_43 AC 1 ms
6,944 KB
testcase_44 AC 4 ms
6,944 KB
testcase_45 AC 4 ms
6,944 KB
testcase_46 AC 5 ms
6,944 KB
testcase_47 AC 32 ms
7,956 KB
testcase_48 AC 36 ms
12,580 KB
testcase_49 AC 35 ms
12,560 KB
testcase_50 AC 33 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC optimize("O3")
//#pragma GCC optimize ("unroll-loops")
#pragma GCC target ("avx2")
#define io_init cin.tie(0);ios::sync_with_stdio(0);cout<<setprecision(10)
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
constexpr int INF = 2147483647;
constexpr long long int INF_LL = 9223372036854775807;
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979323846;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;


int main() {
	io_init;
	int N, M;
	cin >> N >> M;
	__gnu_pbds::gp_hash_table<ll, int> hm;
	for (int i = 0; i < N; i++) {
		ll tmp;
		cin >> tmp;
		hm[tmp]++;
	}
	for (int i = 0; i < M; i++) {
		ll tmp;
		cin >> tmp;
		cout << hm[tmp] << (i == M ? "\n" : " ");
	}
}
0