Advertisement
STANAANDREY

cards

Sep 18th, 2019
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #define uns unsigned
  3. #define ll long long
  4. const char newline('\n');
  5. using namespace std;
  6. ///**************************
  7.  
  8. int n;
  9. string s;
  10. int nrn, nrz;
  11.  
  12. int main()
  13. {
  14.     cin >> n >> s;
  15.     for (int i = 0; s[i]; i++)
  16.     {
  17.         if (s[i] == 'n')
  18.             nrn++;
  19.         else if (s[i] == 'z')
  20.             nrz++;
  21.     }
  22.     while (nrn)
  23.     {
  24.         cout << 1 <<  ' ';
  25.         nrn--;
  26.     }
  27.     while (nrz)
  28.     {
  29.         cout << 0 << ' ';
  30.         nrz--;
  31.     }
  32.     return EXIT_SUCCESS;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement