Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std ;
- #define sz(s) int(s.size())
- typedef long long ll ;
- void ABDEL3AL () {
- ios_base::sync_with_stdio(false); cin.tie(nullptr) , cout.tie(nullptr) ;
- #ifndef ONLINE_JUDGE
- freopen("input.txt" , "r" , stdin) , freopen("output.txt" , "w" , stdout) ;
- #endif
- }
- int main() {
- ABDEL3AL() ;
- int n , m ;
- cin >> n >> m ;
- int arr[n] , freq[m + 1] ;
- memset(freq , 0 , sizeof (freq)) ;
- for (int i = 0; i < n; i++)
- cin >> arr[i] , freq[arr[i]]++ ;
- for (int i = 1; i <= m; i++)
- if (freq[i]) cout << freq[i] << "\n" ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement