Skip to content

Commit 56e480e

Browse files
committed
Initial Commit
1 parent 316f170 commit 56e480e

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

Comparison.cpp

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#include<bits/stdc++.h>
2+
#include<ext/pb_ds/assoc_container.hpp>
3+
#include<ext/pb_ds/tree_policy.hpp>
4+
5+
#define int long long int
6+
#define double double_t
7+
#define INF 1e18
8+
using namespace __gnu_pbds;
9+
using namespace std;
10+
template<typename T>
11+
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
12+
13+
int GCD(int a, int b) {
14+
return b == 0 ? a : GCD(b, a % b);
15+
}
16+
17+
int power(int x, int y, int MOD) {
18+
if (y == 0) {
19+
return 1;
20+
}
21+
if (y % 2 == 0) {
22+
return power((x * x) % MOD, y / 2, MOD) % MOD;
23+
} else {
24+
return (x * power((x * x) % MOD, (y - 1) / 2, MOD) % MOD) % MOD;
25+
}
26+
}
27+
28+
int32_t main() {
29+
ios_base::sync_with_stdio(false);
30+
cin.tie(nullptr);
31+
cout.tie(nullptr);
32+
int t = 1;
33+
while (t--) {
34+
string A,B;
35+
cin>>A;
36+
cin>>B;
37+
if (A.size()>B.size()){
38+
cout<<"GREATER";
39+
} else if (A.size()==B.size()){
40+
if (A>B){
41+
cout<<"GREATER";
42+
} else if (A==B){
43+
cout<<"EQUAL";
44+
} else{
45+
cout<<"LESS";
46+
}
47+
} else{
48+
cout<<"LESS";
49+
}
50+
51+
cout << "\n";
52+
}
53+
}

0 commit comments

Comments
 (0)