Language: C++

#include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
#include<string>
#include<map>
#include<string.h>
#include<complex>
#include<math.h>
#include<queue>
#include <functional>
#include<time.h>
#include <stack>
#include<iomanip>
using namespace std;
#define rep(i,a,n) for(int i=(a);i<(n);i++)
#define ll long long
#define llint long long int
#define sort(s) sort(s.begin(),s.end())
#define reverse(v)  reverse(v.begin(), v.end());
#define Yes(ans) if(ans)cout<<"Yes"<<endl; else cout<<"No"<<endl;
#define YES(ans) if(ans)cout<<"YES"<<endl; else cout<<"NO"<<endl;
#define hei(a) vector<a>
#define whei(a) vector<vector<a>>
#define UF  UnionFind
#define rt (a); return (a); 
#define Pint pair<int,int>
constexpr auto INF = 1000000000;
constexpr auto mod = 1000000007;
//辞書順はnext_permutation( begin( v ), end( v ) );やで！


//2のn乗を求めるよ！！！
int ni(int n) {
	if (n == 0)return 1;
	int x = ni(n / 2);
	x *= x;
	if (n % 2 == 1)x *= 2;
	return x;
}

//フィボナッチ数列のx番目を求めるよ！
llint f(int x, vector<llint>& s) {
	if (x == 0)return 0;
	if (x == 1)return 1;
	if (s[x] != 0)return s[x];
	return  s[x] = f(x - 1, s) + f(x - 2, s);

}

//aとｂの最大公約数を求めるよ！
llint gcd(llint a, llint b) {
	if (a < b)swap(a, b);
	if (b == 0)return a;
	return gcd(b, a % b);
}



// a^n mod を計算する
long long modpow(long long a, long long n, long long mod) {
	long long res = 1;
	while (n > 0) {
		if (n & 1) res = res * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return res;
}

// mod. m での a の逆元 a^{-1} を計算するよ！
long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}


//aCbをmod.mで割った余りを求める
ll int c(ll int a, ll int b, ll int m) {
	ll int ans = 1;
	for (ll int i = 0; i < b; i++) {
		ans *= a - i;
		ans %= m;
	}
	for (ll int i = 1; i <= b; i++) {
		ans *= modinv(i, m);
		ans %= m;
	}
	return ans;
}

//m進数のn桁を全列挙やで 
void dfs(int m, int n, llint k, hei(llint) a) {
	stack<string> st;
	st.push("");
	while (!st.empty()) {
		string now = st.top();
		st.pop();
		if (now.size() == n) {
			cout << now << endl;
		}
		else {
			for (int i = m - 1; i >= 0; i--) {
				string next = now + to_string(i);
				st.push(next);
			}
		}
	}

}
void press(vector<int>& v) { v.erase(unique((v).begin(), (v).end()), v.end()); }
void press(vector<char>& v) { v.erase(unique((v).begin(), (v).end()), v.end()); }

struct UnionFind {
	vector<int> par; // par[i]:iの親の番号　(例) par[3] = 2 : 3の親が2

	UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
		for (int i = 0; i < N; i++) par[i] = i;
	}
	int size(int a) {
		return par[root(a)];
	}

	int root(int x) { // データxが属する木の根を再帰で得る：root(x) = {xの木の根}
		if (par[x] == x) return x;
		return par[x] = root(par[x]);
	}

	void unite(int x, int y) { // xとyの木を併合
		int rx = root(x); //xの根をrx
		int ry = root(y); //yの根をry
		if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
		par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時：xの根rxをyの根ryにつける
	}

	bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
		int rx = root(x);
		int ry = root(y);
		return rx == ry;
	}
};

struct segmenttree {
	hei(int) seg;
	int s;
	segmenttree(int n) :seg(n * 2 - 1) {
		for (int i = 0; i < n * 2 - 1; i++)seg[i] = 0;
		s = n;
	}


	//k番目の値をaに変更
	void update(int k, int a) {
		k += s - 1;
		seg[k] += a;
		while (k > 0) {
			k = (k - 1) / 2;
			seg[k] = min(seg[k * 2 + 1], seg[k * 2 + 2]);
		}
	}
	//最初はquery(a,b,0,0,n)で呼ぶよ！！！！
	int query(int a, int b, int k, int l, int r) {
		if (r <= a || b <= l)return 1000000;
		if (a <= l && r <= b)return seg[k];
		else {
			int v1 = query(a, b, k * 2 + 1, l, (l + r) / 2);
			int v2 = query(a, b, k * 2 + 2, (l + r) / 2, r);
			return min(v1, v2);
		}
	}
};

int main() {
	string a, b;
	cin >> a >> b;
	string ans="EQUAL";
	if (a.size() > b.size())ans = "GREATER";
	else {
		if (a.size() < b.size())ans = "LESS";
		else {
			rep(i, 0, a.size()) {
				if (a[i] - '0' > b[i] - '0') {
					ans = "GREATER";
					break;
				}
				if (a[i] - '0' < b[i] - '0') {
					ans = "LESS";
					break;
				}
			}
		}
	}
	cout < ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:201:20: error: no match for 'operator<<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>')
  201 |         cout < ans << endl;
      |                ~~~~^~~~~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
  763 |     operator<<(basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 4077 |     operator<<(basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
                 from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
  125 |     operator<<(byte __b, _IntegerType __shift) noexcept
      |     ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   couldn't deduce template parameter '_IntegerType'
  201 |         cout < ans << endl;
      |                       ^~~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
  339 |     operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
      |     ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
  563 |     operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
  573 |     operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
  579 |     operator<<(basic_ostream<char, _Traits>& __out, char __c)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
  590 |     operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
  595 |     operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
  654 |     operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
  307 |     operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
      |     ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
  671 |     operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
  684 |     operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:684:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
/usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)'
  689 |     operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:689:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
/usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)'
  810 |     operator<<(_Ostream&& __os, const _Tp& __x)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:810:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   couldn't deduce template parameter '_Tp'
  201 |         cout < ans << endl;
      |                       ^~~~
In file included from a.cc:9:
/usr/include/c++/14/complex:563:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const complex<_Tp>&)'
  563 |     operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
      |     ^~~~~~~~
/usr/include/c++/14/complex:563:5: note:   template argument deduction/substitution failed:
a.cc:201:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
  201 |         cout < ans << endl;
      |                       ^~~~
In file included from a.cc:15:
/usr/include/c++/14/iomanip:84:5: note: candidate: 'template<cla