-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1613A.cpp
More file actions
79 lines (78 loc) · 1.77 KB
/
Copy path1613A.cpp
File metadata and controls
79 lines (78 loc) · 1.77 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
// Author:Sadman kabir
// date:3/14/2024
//-------------------------------------------------------------
#include <bits/stdc++.h>
using namespace std;
#define pb(x) push_back(x)
#define No cout << "No" << endl
#define Yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define mm cout << "-1" << endl
#define nl "\n"
#define rr return
#define ll long long int
//----------------------------------------------------------------
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;
while (t--)
{
string s1, s2;
int a, b;
cin >> s1 >> a;
cin >> s2 >> b;
while (s1[s1.size() - 1] == '0')
{
a++;
s1.pop_back();
}
while (s2[s2.size() - 1] == '0')
{
b++;
s2.pop_back();
}
if (s1 == s2)
{
if (a == b)
{
cout << "=" << endl;
}
else if (a > b)
{
cout << ">" << endl;
}
else
{
cout << "<" << endl;
}
}
else
{
int x = s1.size() + a;
int y = s2.size() + b;
if (x == y)
{
if (s1 > s2)
{
cout << ">" << endl;
}
else
{
cout << "<" << endl;
}
}
else if (x > y)
{
cout << ">" << endl;
}
else
{
cout << "<" << endl;
}
}
}
}