結果
問題 |
No.3016 ハチマキおじさん
|
ユーザー |
![]() |
提出日時 | 2025-06-12 18:05:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 590 bytes |
コンパイル時間 | 1,766 ms |
コンパイル使用メモリ | 86,992 KB |
実行使用メモリ | 13,328 KB |
最終ジャッジ日時 | 2025-06-12 18:07:10 |
合計ジャッジ時間 | 6,543 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 31 |
ソースコード
#include <iostream> #include <unordered_map> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N, M; cin >> N >> M; unordered_map<long long, int> count; for (int i = 0; i < N; ++i) { long long a; cin >> a; ++count[a]; } vector<int> res(M); for (int i = 0; i < M; ++i) { long long b; cin >> b; res[i] = count[b]; } for (int i = 0; i < M; ++i) { if (i > 0) cout << ' '; cout << res[i]; } cout << '\n'; return 0; }