結果
問題 |
No.1032 数数え
|
ユーザー |
|
提出日時 | 2020-05-31 04:50:08 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 141 ms / 2,000 ms |
コード長 | 414 bytes |
コンパイル時間 | 1,100 ms |
コンパイル使用メモリ | 99,504 KB |
最終ジャッジ日時 | 2025-01-10 19:57:25 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <numeric> #include <math.h> #include <map> using namespace std; typedef long long int ll; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n,m; cin >> n >> m; map<int,int> mp; while(n--){ int p; cin >> p; mp[p]++; } for(int i=1;i<=m;i++){ printf("%d %d\n",i,mp[i]); } }