답안 #942569

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
942569 2024-03-10T22:02:21 Z qin Bulldozer (JOI17_bulldozer) C++17
컴파일 오류
0 ms 0 KB
//~ #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define fi first
#define se second
#define pn printf("\n")
#define ssize(x) int(x.size())
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define bitcount(x) __builtin_popcount(x)
#define clz(x) __builtin_clz(x)
#define ctz(x) __builtin_ctz(x)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
typedef long double db;
#define int ll
#define vv vector
/*void read(int &a){
		char c = getchar_unlocked(); a = 0;
		while(c<'0' || '9'<c) c = getchar_unlocked();
		while('0'<=c&&c<='9') a = (a<<3)+(a<<1)+c-'0', c = getchar_unlocked();
}*/
int inf = 2e09; ll infll = 2e18; int mod = (1<<23)*119+1;
struct pt{
		int x, y, val;
		pt(){ x = 0, y = 0, val = 0; }
		pt(int X, int Y, int V){ x = X, y = Y, val = V; }
		bool operator <(const pt &a) const{ return x != a.x ? x < a.x : y < a.y; }
};
const ll INF = 1e10;
struct fr{
		ll a, b;
		fr(){ a = 0, b = 1; }
		fr(ll A, ll B){ 
				if(B < 0) A = -A, B = -B;
				a = A/gcd(A, B), b = B/gcd(A, B); 
		}
		bool operator <(const fr &x) const{
				if(a == INF || x.a == INF) return a < x.a;
				return a*x.b < x.a*b;
		}
		bool operator ==(const fr &x) const{
				if(a == INF || x.a == INF) return a == x.a;
				return a*x.b == x.a*b;
		}
};
db eps = 1e-15;
bool equal(db a, db b){ return abs(b-a) < eps; }
struct line{
		fr a;
		db b;
		int x1, x2, i, j;
		line(){ a = fr(), b = 0, x1 = 0, x2 = 0, i = 0, j = 0; }
		line(int X1, int Y1, int X2, int Y2, int I, int J){
				if(X1 == X2) a = fr(INF, 1), b = 0, x1 = min(Y1, Y2), x2 = max(Y1, Y2);
				else a = fr(Y2-Y1, X2-X1), b = db(Y1)-((Y2-Y1)/(X2-X1))*X1, x1 = min(X1, X2), x2 = max(X1, X2);
				i = I, j = J;
		}
		bool operator <(const line &t) const{
				if(a != t.a) return a < t.a;
				else if(!equal(b, t.b)) return b < t.b;
				else if(x1 != t.x1) return x1 < t.x1;
				return x2 < t.x2;
		}
};
int base = 1;
struct seg{
		struct Node{
				ll mx, mn, mx_delta;
				Node(){ mx = -infll, mn = infll, mx_delta = -infll; }
				Node(ll val){ mx = val, mn = val, mx_delta = 0; }
		};
		vv<Node> t;
		void init(int n, vv<ll> &pf){
				while(base < n) base <<= 1;
				t.resize(base<<1);
				for(int i = 1; i <= n; ++i) t[i+base-1] = Node(pf[i]);
				for(int i = base-1; i; --i){
						t[i].mx = max(t[i<<1].mx, t[i<<1|1].mx);
						t[i].mn = min(t[i<<1].mn, t[i<<1|1].mn);
						t[i].mx_delta = max(t[i<<1|1].mx-t[i<<1].mn, max(t[i<<1].mx_delta, t[i<<1|1].mx_delta));
				}
		}
		void update(int i, ll val){ //tutaj ewentualnie mozna dozylowywac
				for(i += base-1, t[i] = Node(val), i >>= 1; i; i >>= 1){
						t[i].mx = max(t[i<<1].mx, t[i<<1|1].mx);
						t[i].mn = min(t[i<<1].mn, t[i<<1|1].mn);
						t[i].mx_delta = max(t[i<<1|1].mx-t[i<<1].mn, max(t[i<<1].mx_delta, t[i<<1|1].mx_delta));
				}
		}
		ll query(){ return max(t[1].mx, t[1].mx_delta); }
};
void answer(){
		int n; scanf("%lld", &n);
		vv<pt> p(n+1);
		for(int i = 1; i <= n; ++i) scanf("%lld%lld%lld", &p[i].x, &p[i].y, &p[i].val);
		sort(1+all(p));
		vv<line> t((n*(n-1))/2);
		for(int i = 1, l = 0; i <= n-1; ++i)
				for(int j = i+1; j <= n; ++j, ++l) t[l] = line(p[i].x, p[i].y, p[j].x, p[j].y, i, j);
		sort(all(t));
		//~ for(line &u : t) cout << setprecision(20) << fixed << u.a << " " << u.b <<"\n";//printf("%f %f %d %d\n", u.a, u.b, u.x1, u.x2);
		
		vv<ll> pf(n+1);
		vv<int> pos(n+1);
		for(int i = 1; i <= n; ++i) pf[i] = pf[i-1]+p[i].val, pos[i] = i;
		seg seg; seg.init(n, pf);
		
		
		ll result = max(0ll, seg.query());
		//~ printf("%lld\n", result);
		//~ for(int i = 1; i <= n; ++i) printf("%lld ", pf[i]);
		//~ pn;
		for(int i = 0; i < ssize(t); ++i){
				int a = t[i].i, b = t[i].j; //assert(abs(pos[a]-pos[b]) == 1);
				if(pos[b] < pos[a]) swap(a, b);
				pf[pos[a]] += p[b].val-p[a].val;
				swap(pos[a], pos[b]);
				seg.update(pos[a], pf[pos[a]]), seg.update(pos[b], pf[pos[b]]);
				
				while(i+1 < ssize(t) && t[i+1].a == t[i].a){
						++i;
						a = t[i].i, b = t[i].j; //assert(abs(pos[a]-pos[b]) == 1);
						if(pos[b] < pos[a]) swap(a, b);
						pf[pos[a]] += p[b].val-p[a].val;
						swap(pos[a], pos[b]);
						seg.update(pos[a], pf[pos[a]]), seg.update(pos[b], pf[pos[b]]);
				}
				result = max(result, seg.query());
				//~ printf("%lld\n", seg.query());
				//~ for(int j = 1; j <= n; ++j) printf("%lld ", pf[j]);
				//~ pn;
		}
		printf("%lld\n", result);
}
signed main(){
		int T = 1;
		//~ scanf("%d", &T);
		//~ ios_base::sync_with_stdio(0); cin.tie(0); //cin >> T;
		for(++T; --T; ) answer();
		return 0;
}

Compilation message

bulldozer.cpp: In member function 'bool line::operator<(const line&) const':
bulldozer.cpp:63:10: error: no match for 'operator!=' (operand types are 'const fr' and 'const fr')
   63 |     if(a != t.a) return a < t.a;
      |        ~ ^~ ~~~
      |        |      |
      |        |      const fr
      |        const fr
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/regex.h:1064:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&)'
 1064 |     operator!=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1064:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/regex.h:1144:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const std::__cxx11::sub_match<_BiIter>&)'
 1144 |     operator!=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1144:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/regex.h:1237:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
 1237 |     operator!=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1237:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/regex.h:1311:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type*, const std::__cxx11::sub_match<_BiIter>&)'
 1311 |     operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1311:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/regex.h:1405:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
 1405 |     operator!=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1405:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/regex.h:1479:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type&, const std::__cxx11::sub_match<_BiIter>&)'
 1479 |     operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1479:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/regex.h:1579:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
 1579 |     operator!=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1579:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/regex.h:2126:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator!=(const std::__cxx11::match_results<_BiIter, _Alloc>&, const std::__cxx11::match_results<_BiIter, _Alloc>&)'
 2126 |     operator!=(const match_results<_Bi_iter, _Alloc>& __m1,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:2126:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/stl_pair.h:496:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
  496 |     operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:496:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::pair<_T1, _T2>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/stl_iterator.h:372:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)'
  372 |     operator!=(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:372:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::reverse_iterator<_Iterator>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/stl_iterator.h:410:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
  410 |     operator!=(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:410:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::reverse_iterator<_Iterator>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/stl_iterator.h:1444:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
 1444 |     operator!=(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1444:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::move_iterator<_IteratorL>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/stl_iterator.h:1501:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)'
 1501 |     operator!=(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1501:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::move_iterator<_IteratorL>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/iosfwd:40,
                 from /usr/include/c++/10/ios:38,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/postypes.h:227:5: note: candidate: 'template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)'
  227 |     operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/10/bits/postypes.h:227:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::fpos<_StateT>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/string:41,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/allocator.h:213:5: note: candidate: 'template<class _T1, class _T2> bool std::operator!=(const std::allocator<_CharT>&, const std::allocator<_T2>&)'
  213 |     operator!=(const allocator<_T1>&, const allocator<_T2>&)
      |     ^~~~~~~~
/usr/include/c++/10/bits/allocator.h:213:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::allocator<_CharT>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/bits/basic_string.h:48,
                 from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from bulldozer.cpp:2:
/usr/include/c++/10/string_view:525:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(std::basic_string_view<_CharT, _Traits>, std::basic_string_view<_CharT, _Traits>)'
  525 |     operator!=(basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/10/string_view:525:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'fr' is not derived from 'std::basic_string_view<_CharT, _Traits>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/bits/basic_string.h:48,
                 from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from bulldozer.cpp:2:
/usr/include/c++/10/string_view:531:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(std::basic_string_view<_CharT, _Traits>, std::__type_identity_t<std::basic_string_view<_CharT, _Traits> >)'
  531 |     operator!=(basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/10/string_view:531:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'fr' is not derived from 'std::basic_string_view<_CharT, _Traits>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/bits/basic_string.h:48,
                 from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from bulldozer.cpp:2:
/usr/include/c++/10/string_view:538:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(std::__type_identity_t<std::basic_string_view<_CharT, _Traits> >, std::basic_string_view<_CharT, _Traits>)'
  538 |     operator!=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
      |     ^~~~~~~~
/usr/include/c++/10/string_view:538:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'fr' is not derived from 'std::basic_string_view<_CharT, _Traits>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6229:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 6229 |     operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6229:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   'const fr' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from bulldozer.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6242:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 6242 |     operator!=(const _CharT* __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6242:5: note:   template argument deduction/substitution failed:
bulldozer.cpp:63:15: note:   mismatched types 'const _CharT*' and 'fr'
   63 |     if(a != t.a) return a < t.a;
      |               ^
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,