結果
| 問題 | No.8016 unordered_mapなるたけ落とすマン |
| ユーザー |
|
| 提出日時 | 2020-08-01 09:29:11 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 78 ms / 1,000 ms |
| コード長 | 599 bytes |
| 記録 | |
| コンパイル時間 | 835 ms |
| コンパイル使用メモリ | 79,116 KB |
| 最終ジャッジ日時 | 2025-01-12 12:22:02 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 48 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
using lint = long long;
void solve() {
int n, m;
std::cin >> n >> m;
std::vector<lint> xs(n);
for (auto& x : xs) std::cin >> x;
std::sort(xs.begin(), xs.end());
while (m--) {
lint y;
std::cin >> y;
std::cout << std::upper_bound(xs.begin(), xs.end(), y) -
std::lower_bound(xs.begin(), xs.end(), y)
<< " ";
}
std::cout << " ";
}
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
solve();
return 0;
}