結果
問題 |
No.1032 数数え
|
ユーザー |
|
提出日時 | 2025-02-14 12:48:11 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 402 bytes |
コンパイル時間 | 945 ms |
コンパイル使用メモリ | 85,028 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-02-14 12:48:14 |
合計ジャッジ時間 | 2,422 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <iostream> #include <cstdint> #include <vector> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); uint32_t N, M, i; cin >> N >> M; vector<uint32_t> L(N); for (i = 0; i != N; ++i) cin >> L[i]; vector<uint32_t> count(200001, 0); for (i = 0; i != N; ++i) ++count[L[i]]; for (i = 1; i <= M; ++i) cout << i << ' ' << count[i] << '\n'; return 0; }