結果

問題 No.1032 数数え
ユーザー t98slidert98slider
提出日時 2022-05-12 22:15:32
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 282 bytes
コンパイル時間 1,590 ms
コンパイル使用メモリ 167,644 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-20 16:40:17
合計ジャッジ時間 2,585 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    int n, m;
    cin >> n >> m;
    vector<int> cnt(200001);
    for(int i = 0, x; i < n; i++){
        cin >> x;
        cnt[x] ++;
    }
    for(int i = 1; i <= m; i++){
        cout << i << " " << cnt[i] << '\n';
    }
}
0