結果
問題 | No.3016 unordered_mapなるたけ落とすマン |
ユーザー | sntea |
提出日時 | 2017-02-24 05:33:56 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 63 ms / 1,000 ms |
コード長 | 1,470 bytes |
コンパイル時間 | 2,743 ms |
コンパイル使用メモリ | 173,116 KB |
実行使用メモリ | 8,232 KB |
最終ジャッジ日時 | 2023-08-30 22:53:07 |
合計ジャッジ時間 | 6,963 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | AC | 62 ms
8,008 KB |
testcase_04 | AC | 62 ms
8,100 KB |
testcase_05 | AC | 63 ms
8,084 KB |
testcase_06 | AC | 60 ms
8,056 KB |
testcase_07 | AC | 62 ms
7,948 KB |
testcase_08 | AC | 61 ms
8,060 KB |
testcase_09 | AC | 61 ms
8,056 KB |
testcase_10 | AC | 60 ms
7,904 KB |
testcase_11 | AC | 60 ms
7,904 KB |
testcase_12 | AC | 60 ms
7,988 KB |
testcase_13 | AC | 60 ms
8,076 KB |
testcase_14 | AC | 59 ms
8,100 KB |
testcase_15 | AC | 60 ms
8,012 KB |
testcase_16 | AC | 59 ms
8,096 KB |
testcase_17 | AC | 61 ms
7,992 KB |
testcase_18 | AC | 60 ms
8,096 KB |
testcase_19 | AC | 59 ms
7,940 KB |
testcase_20 | AC | 59 ms
7,992 KB |
testcase_21 | AC | 58 ms
8,056 KB |
testcase_22 | AC | 58 ms
7,936 KB |
testcase_23 | AC | 58 ms
8,216 KB |
testcase_24 | AC | 57 ms
8,076 KB |
testcase_25 | AC | 57 ms
7,984 KB |
testcase_26 | AC | 57 ms
8,100 KB |
testcase_27 | AC | 56 ms
7,924 KB |
testcase_28 | AC | 56 ms
8,232 KB |
testcase_29 | AC | 56 ms
7,984 KB |
testcase_30 | AC | 56 ms
7,920 KB |
testcase_31 | AC | 56 ms
8,080 KB |
testcase_32 | AC | 56 ms
8,012 KB |
testcase_33 | AC | 56 ms
7,984 KB |
testcase_34 | AC | 55 ms
7,948 KB |
testcase_35 | AC | 56 ms
7,928 KB |
testcase_36 | AC | 55 ms
7,904 KB |
testcase_37 | AC | 55 ms
8,060 KB |
testcase_38 | AC | 56 ms
7,924 KB |
testcase_39 | AC | 55 ms
7,920 KB |
testcase_40 | AC | 54 ms
8,056 KB |
testcase_41 | AC | 1 ms
4,380 KB |
testcase_42 | AC | 2 ms
4,380 KB |
testcase_43 | AC | 1 ms
4,380 KB |
testcase_44 | AC | 6 ms
4,376 KB |
testcase_45 | AC | 5 ms
4,380 KB |
testcase_46 | AC | 5 ms
4,376 KB |
testcase_47 | AC | 45 ms
6,128 KB |
testcase_48 | AC | 47 ms
6,092 KB |
testcase_49 | AC | 46 ms
6,132 KB |
testcase_50 | AC | 40 ms
4,376 KB |
ソースコード
#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); } LL f(LL x){ x = x^(x<<13); x = x^(x>>7); x = x^(x<<17); 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; }