Promi_38

cf 1220A

Oct 19th, 2021
586
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits\stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int n, i;
  7.     cin >> n;
  8.     string s;
  9.     cin >> s;
  10.    
  11.     int cz = 0, cn = 0;
  12.     for(i = 0; i < s.length(); i++)
  13.     {
  14.         if(s[i] == 'z') cz++;
  15.         else if(s[i] =='n') cn++;
  16.     }
  17.    
  18.     for(i = 0; i < cn; i++) printf("1 ");
  19.     for(i = 0; i < cz; i++) printf("0 ");
  20.     cout << endl;
  21. }
  22.  
RAW Paste Data