結果
| 問題 | 
                            No.1032 数数え
                             | 
                    
| ユーザー | 
                            👑  | 
                    
| 提出日時 | 2021-12-13 00:03:06 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 339 ms / 2,000 ms | 
| コード長 | 316 bytes | 
| コンパイル時間 | 713 ms | 
| コンパイル使用メモリ | 68,736 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-21 13:27:17 | 
| 合計ジャッジ時間 | 2,066 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 | 
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main(){
    int n,k;cin>>n>>k;
    vector<int> A(k);
    
    for(int i = 0; n > i; i++){
        int t;cin>>t;
        if(t <= k){
            A[t-1]++;
        }
    }
    for(int i = 0; k > i; i++){
        cout << i+1 << " " << A[i] << endl;
    }
}