Repository navigation
Expand file tree
/
Copy pathA_Compare_T-Shirt_Sizes.cpp
More file actions
148 lines (138 loc) · 2.88 KB
/
Copy pathA_Compare_T-Shirt_Sizes.cpp
File metadata and controls
148 lines (138 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#include <bits/stdc++.h>
using namespace std;
// Macros
#define ll long long
#define vb vector<bool>
#define vl vector<long long>
#define vi vector<int>
#define vvl vector<vector<long long>>
#define vpl vector<pair<long long, long long>>
#define ml map<long long, long long>
#define mpl map<pair<long long, long>, pair<long long, long long>>
#define pl pair<long long, long long>
#define sort(x) sort(x.begin(), x.end())
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define seea(a,x,y) for(int i=x;i<y;i++){cin>>a[i];}
#define seev(v,n) for(int i=0;i<n;i++){int x; cin>>x; v.push_back(x);}
#define sees(s,n) for(int i=0;i<n;i++){int x; cin>>x; s.insert(x);}
#define rep(i,a,b) for(int i=a; i<b; i++)
#define even(x) x % 2 == 0
#define odd(x) x % 2 != 0
// Constants
const long long MOD = 1e9 + 7;
const long N = 1e5 + 7;
const long long llmax = LONG_LONG_MAX;
void solve()
{
string s, t;
cin >> s >> t;
if(s == t)
{
cout << "=" << endl;
return;
}
int l = s.length(), m = t.length();
if(s[l-1] == t[m-1])
{
if(s[l-1] == 'S')
{
if(l == m) cout << "=" << endl;
else if(l > m) cout << "<" << endl;
else cout << ">" << endl;
}
if(s[l-1] == 'L')
{
if(l == m) cout << "=" << endl;
else if(l > m) cout << ">" << endl;
else cout << "<" << endl;
}
}
else if(s[l-1] == 'S' and t[m-1] == 'L')
{
cout << "<" << endl;
}
else if (s[l-1] == 'L' and t[m-1] == 'S')
{
cout << ">" << endl;
}
else if(s[l-1] == 'M')
{
if(t[m-1] == 'S')
{
cout << ">" << endl;
}
if(t[m-1] == 'L')
{
cout << "<" << endl;
}
}
else if(s[l-1] == 'S')
{
if(t[m-1] == 'M')
{
cout << "<" << endl;
}
if(t[m-1] == 'L')
{
cout << "<" << endl;
}
}
else if(s[l-1] == 'L')
{
if(t[m-1] == 'S')
{
cout << ">" << endl;
}
if(t[m-1] == 'M')
{
cout << ">" << endl;
}
}
else if(t[l-1] == 'M')
{
if(s[m-1] == 'S')
{
cout << "<" << endl;
}
if(s[m-1] == 'L')
{
cout << ">" << endl;
}
}
else if(t[l-1] == 'S')
{
if(s[m-1] == 'M')
{
cout << ">" << endl;
}
if(s[m-1] == 'L')
{
cout << ">" << endl;
}
}
else if(t[l-1] == 'L')
{
if(s[m-1] == 'S')
{
cout << "<" << endl;
}
if(s[m-1] == 'M')
{
cout << "<" << endl;
}
}
}
int main()
{
int t;
cin >> t;
while(t--)
{
solve();
}
return 0;
}