結果
| 問題 |
No.1032 数数え
|
| ユーザー |
monnu
|
| 提出日時 | 2020-05-25 23:30:26 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 317 ms / 2,000 ms |
| コード長 | 458 bytes |
| コンパイル時間 | 1,585 ms |
| コンパイル使用メモリ | 169,316 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-13 02:21:26 |
| 合計ジャッジ時間 | 3,246 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using Graph=vector<vector<pair<int,int>>>;
#define INF 1000000000000000000
#define MOD 1000000007
int main(){
int N,M;
cin>>N>>M;
vector<int> L(N);
for(int i=0;i<N;i++){
cin>>L.at(i);
L.at(i)--;
}
vector<int> count(M,0);
for(int i=0;i<N;i++){
if(L.at(i)<M){
count.at(L.at(i))++;
}
}
for(int i=0;i<M;i++){
cout<<i+1<<" "<<count.at(i)<<endl;
}
}
monnu