- #include <bits/stdc++.h>
- using namespace std;
- string s1,s2,w="CDHS";
- int main()
- {
- cin>>s1>>s2;
- int w1=w.find(s1[0]),w2=w.find(s2[0]);
- if(w1>w2) cout<<s1<<" > "<<s2;
- else if(w1<w2) cout<<s1<<" < "<<s2;
- else
- {
- int n1=stoi(s1.substr(1)),n2=stoi(s2.substr(1));
- if(n1>n2) cout<<s1<<" > "<<s2;
- else if(n1<n2) cout<<s1<<" < "<<s2;
- else cout<<s1<<" = "<<s2;
- }
- return 0;
- }
複製代碼 |