SHARE
TWEET

cards

STANAANDREY Sep 18th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
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