結果
問題 |
No.8016 unordered_mapなるたけ落とすマン
|
ユーザー |
|
提出日時 | 2024-11-13 11:55:21 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 122 ms / 1,000 ms |
コード長 | 595 bytes |
コンパイル時間 | 3,455 ms |
コンパイル使用メモリ | 251,864 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-13 11:55:33 |
合計ジャッジ時間 | 12,469 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 48 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(), (a).end() int main() { cin.tie(nullptr); int N, M; cin >> N >> M; vector<ll> A(N), B(M); rep(i, 0, N) cin >> A[i]; rep(i, 0, M) cin >> B[i]; sort(all(A)); rep(i, 0, M) { int l = lower_bound(all(A), B[i]) - A.begin(); int r = upper_bound(all(A), B[i]) - A.begin(); cout << r - l; if (i == M - 1) cout << '\n'; else cout << ' '; } }