Skip to content

Commit 2dc379a

Browse files
committed
Added 1741A - Compare T-Shirt Sizes.cpp
1 parent df1753b commit 2dc379a

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

1741A - Compare T-Shirt Sizes.cpp

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
}

0 commit comments

Comments
 (0)