結果
| 問題 |
No.3016 ハチマキおじさん
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 21:34:32 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 710 bytes |
| コンパイル時間 | 3,710 ms |
| コンパイル使用メモリ | 89,240 KB |
| 実行使用メモリ | 16,560 KB |
| 最終ジャッジ日時 | 2025-06-12 21:35:40 |
| 合計ジャッジ時間 | 4,470 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 31 |
ソースコード
#include <unordered_map>
#include <vector>
#include <iostream>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
vector<long long> A(N);
for (int i = 0; i < N; ++i) {
cin >> A[i];
}
unordered_map<long long, int> freq;
for (auto num : A) {
freq[num]++;
}
vector<long long> B(M);
for (int i = 0; i < M; ++i) {
cin >> B[i];
}
vector<int> res;
for (auto num : B) {
res.push_back(freq[num]);
}
for (size_t i = 0; i < res.size(); ++i) {
if (i != 0) {
cout << " ";
}
cout << res[i];
}
cout << endl;
return 0;
}
gew1fw