結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー snteasntea
提出日時 2017-02-24 05:37:37
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 1,571 bytes
コンパイル時間 2,085 ms
コンパイル使用メモリ 175,132 KB
実行使用メモリ 8,136 KB
最終ジャッジ日時 2023-08-30 22:54:52
合計ジャッジ時間 7,408 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 58 ms
7,984 KB
testcase_04 AC 61 ms
8,084 KB
testcase_05 WA -
testcase_06 AC 60 ms
8,016 KB
testcase_07 AC 60 ms
8,048 KB
testcase_08 AC 60 ms
7,964 KB
testcase_09 AC 62 ms
7,984 KB
testcase_10 AC 62 ms
7,976 KB
testcase_11 AC 61 ms
7,960 KB
testcase_12 AC 60 ms
7,920 KB
testcase_13 AC 59 ms
8,020 KB
testcase_14 AC 59 ms
7,976 KB
testcase_15 AC 61 ms
8,052 KB
testcase_16 AC 61 ms
8,008 KB
testcase_17 AC 59 ms
8,092 KB
testcase_18 AC 58 ms
7,952 KB
testcase_19 WA -
testcase_20 AC 56 ms
7,956 KB
testcase_21 AC 58 ms
7,980 KB
testcase_22 WA -
testcase_23 AC 62 ms
8,136 KB
testcase_24 AC 60 ms
7,964 KB
testcase_25 AC 58 ms
8,088 KB
testcase_26 AC 58 ms
7,980 KB
testcase_27 AC 57 ms
8,096 KB
testcase_28 AC 57 ms
7,980 KB
testcase_29 AC 57 ms
7,948 KB
testcase_30 AC 58 ms
8,008 KB
testcase_31 AC 56 ms
8,004 KB
testcase_32 AC 57 ms
7,944 KB
testcase_33 AC 56 ms
8,004 KB
testcase_34 AC 56 ms
7,944 KB
testcase_35 AC 55 ms
7,988 KB
testcase_36 AC 55 ms
7,924 KB
testcase_37 AC 56 ms
7,952 KB
testcase_38 AC 56 ms
8,012 KB
testcase_39 AC 54 ms
7,948 KB
testcase_40 AC 54 ms
7,948 KB
testcase_41 AC 2 ms
4,376 KB
testcase_42 AC 1 ms
4,376 KB
testcase_43 AC 2 ms
4,376 KB
testcase_44 AC 5 ms
4,376 KB
testcase_45 AC 5 ms
4,380 KB
testcase_46 AC 5 ms
4,504 KB
testcase_47 AC 44 ms
5,980 KB
testcase_48 AC 46 ms
6,056 KB
testcase_49 AC 46 ms
6,056 KB
testcase_50 AC 40 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#ifdef LOCAL111
#else
	#define NDEBUG
#endif
#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define ALL(a)  (a).begin(),(a).end()
#define SZ(a) int((a).size())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define RBP(i,a) for(auto& i : a)
#ifdef LOCAL111
	#define DEBUG(x) cout<<#x<<": "<<(x)<<endl
#else
	#define DEBUG(x) true
#endif
#define F first
#define S second
#define SNP string::npos
#define WRC(hoge) cout << "Case #" << (hoge)+1 << ": "
#define INF 1e8
template<typename T> void pite(T a, T b){ for(T ite = a; ite != b; ite++) cout << (ite == a ? "" : " ") << *ite; cout << endl;}
template<typename T> bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;}
template<typename T> bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;}

typedef pair<int,int> P;
typedef long long int LL;
typedef unsigned long long ULL;
typedef pair<LL,LL> LP;

void ios_init(){
	//cout.setf(ios::fixed);
	//cout.precision(12);
#ifdef LOCAL111
	return;
#endif
	ios::sync_with_stdio(false); cin.tie(0);	
}

random_device rnd;
int shift1 = rnd()%64;
int shift2 = rnd()%64;
int shift3 = rnd()%64;
LL f(LL x){
	x = x^(x<<shift1);
	x = x^(x>>shift2);
	x = x^(x<<shift3);
	return x;
}

int main()
{
	ios_init();
	int n,m;
	cin >> n >> m;
	unordered_map<LL,int> mp;
	REP(i,n){
		LL a;
		cin >> a;
		mp[f(a)]++;
	}
	vector<int> ans(m);
	REP(i,m){
		LL b;
		cin >> b;
		ans[i] = mp[f(b)];
	}
	pite(ALL(ans));
	return 0;
}
0