SHARE
TWEET

124

a guest Mar 20th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define _CRT_SECURE_NO_WARNINGS
  2.  
  3. #include <iostream>
  4. #include <algorithm>
  5. #include <cmath>
  6. #include <string>
  7. #include <vector>
  8. #include <map>
  9. #include <set>
  10. #include <queue>
  11.  
  12. using namespace std;
  13.  
  14. #define ll long long
  15. #define ull unsigned long long
  16. const ll INF = 999999999999999999;
  17. const double PI = acos(-1.0);
  18.  
  19. void stop()
  20. {
  21. #ifndef ONLINE_JUDGE
  22.     //system("pause");
  23. #endif
  24.     exit(0);
  25. }
  26.  
  27. ll A[105];
  28.  
  29. int main()
  30. {
  31.     //freopen("", "r", stdin);
  32.     //freopen("", "w", stdout);
  33.     ios::sync_with_stdio(false);
  34.  
  35.     ll n, m;
  36.     cin >> n >> m;
  37.     ll a, b;
  38.     for (ll i = 0; i < m; i++)
  39.     {
  40.         cin >> a >> b;
  41.         A[a]++;
  42.         A[b]++;
  43.     }
  44.     for (ll i = 1; i <= n; i++)
  45.     {
  46.         cout << A[i] << " ";
  47.     }
  48.  
  49.     stop();
  50. }
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