File tree Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ // ॐ नमः शिवाय
2+ #include < bits/stdc++.h>
3+ using namespace std ;
4+
5+ #define ll long long
6+ #define pb push_back
7+ #define ff first
8+ #define ss second
9+ #define mp make_pair
10+
11+ // Code Written By: Vikash Patel
12+ // Codeforces Profile: https://codeforces.com/profile/vikashpatel
13+
14+ string solve (string a, string b)
15+ {
16+ int la = a.size (), lb = b.size ();
17+ if (a[la-1 ] != b[lb-1 ])
18+ {
19+ if (a[la-1 ] > b[lb-1 ])
20+ return " <" ;
21+ return " >" ;
22+ }
23+ else
24+ {
25+ if (a[la-1 ] == ' S' )
26+ {
27+ if (la > lb)
28+ return " <" ;
29+ else if (la == lb)
30+ return " =" ;
31+ else
32+ return " >" ;
33+ }
34+ else if (a[la-1 ] == ' L' )
35+ {
36+ if (la > lb)
37+ return " >" ;
38+ else if (la == lb)
39+ return " =" ;
40+ return " <" ;
41+ }
42+ return " =" ;
43+ }
44+ }
45+
46+ int main ()
47+ {
48+ ios_base::sync_with_stdio (0 );
49+ cin.tie (0 );
50+ cout.tie (0 );
51+
52+ // #ifndef ONLINE_JUDGE
53+ // freopen("input.txt", "r", stdin);
54+ // freopen("/Users/vikash/Desktop/output.txt", "w", stdout);
55+ // #endif
56+
57+ int t;
58+ cin>>t;
59+ while (t--)
60+ {
61+ string a, b;
62+ cin>>a>>b;
63+ cout<<solve (a, b)<<endl;
64+ }
65+ return 0 ;
66+ }
You can’t perform that action at this time.
0 commit comments