SHARE
TWEET

Untitled

a guest Nov 18th, 2018 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int n, m, a[110];
  5.  
  6. int main()
  7. {
  8.     cin >> n >> m;
  9.     for(int i = 1; i <= m; i++){
  10.         int x, y;
  11.         cin >> x >> y;
  12.         a[x]++;
  13.         a[y]++;
  14.     }
  15.     for(int i = 1; i <= n; i++){
  16.             cout << a[i] << " ";
  17.     }
  18.     return 0;
  19.  
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top