knightL

Yandex A

Oct 9th, 2021
2,098
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <set>
  4. #include <map>
  5. #include <queue>
  6. #include <cassert>
  7. #include <vector>
  8. #include <string>
  9. using namespace std;
  10.  
  11. typedef long long ll;
  12.  
  13. string apply_transfrom(const string &x)
  14. {
  15.     string res = "";
  16.     for(char c: x)
  17.         if(c=='z')
  18.             res+='0';
  19.         else if(c=='n')
  20.             res+='1';
  21.     return res;
  22. }
  23.  
  24. int main()
  25. {
  26.     string a,b;
  27.     cin>>a>>b;
  28.     a=apply_transfrom(a);
  29.     b=apply_transfrom(b);
  30.  
  31.     if(a.size() > b.size() || (a.size() == b.size() && a>b))
  32.         cout << ">" << endl;
  33.     else if(a == b)
  34.         cout << "=" << endl;
  35.     else
  36.         cout << "<" << endl;
  37.  
  38.  
  39.     return 0;
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment