Submission #943591

# Submission time Handle Problem Language Result Execution time Memory
943591 2024-03-11T16:01:48 Z andrei_boaca Sightseeing in Kyoto (JOI22_kyoto) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;
ifstream fin("date.in");
ofstream fout("date.out");
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pll;
ll n,m;
ll A[100005],B[100005];
set<ll> lines,cols;
struct date
{
    vector<ll> v;
    bool operator < (date b)
    {
        if(v[0]*b.v[1]+v[2]+v[3]+b.v[2]+b.v[3]<v[1]*b.v[0]+v[2]+v[3]+b.v[2]+b.v[3])
            return true;
        if(v[0]*b.v[1]+v[2]+v[3]+b.v[2]+b.v[3]>=v[1]*b.v[0]+v[2]+v[3]+b.v[2]+b.v[3])
            return false;
    }
};
multiset<date> setik; /// 0 -> linie, 1 -> coloana
pll getval(ll a,ll b)
{
    //assert(b!=0);
    /*if(a==0)
        return {0,1};
    ll g=__gcd(a,b);
    a/=g;
    b/=g;*/
    return {a,b};
}
void elimlin(ll poz)
{
    auto it=lines.find(poz);
    ll st=0,dr=0;
    if(it!=lines.begin())
        st=*prev(it);
    it++;
    if(it!=lines.end())
    {
        dr=(*it);
        //assert(dr>poz);
    }
    lines.erase(poz);
    if(st!=0)
    {
        bool prost=0;
        if(st>=poz)
            prost=1;
        //assert(poz>st);
        pll val=getval(A[poz]-A[st],poz-st);
        setik.erase({{val.first,val.second,poz,0}});
    }
    if(dr!=0)
    {
        //assert(poz<dr);
        pll val=getval(A[dr]-A[poz],dr-poz);
        setik.erase({{val.first,val.second,dr,0}});
    }
    if(st!=0&&dr!=0)
    {
        //assert(st<dr);
        pll val=getval(A[dr]-A[st],dr-st);
        setik.insert({{val.first,val.second,dr,0}});
    }
}
void elimcol(ll poz)
{
    bool ok=0;
    if(poz==450)
    {
        //cout<<"a trecut pe aici\n";
        ok=1;
    }
    auto it=cols.find(poz);
    ll st=0,dr=0;
    if(it!=cols.begin())
        st=*prev(it);
    it++;
    if(it!=cols.end())
    {
        dr=(*it);
        //assert(dr>poz);
    }
    cols.erase(poz);
    if(st!=0)
    {
        bool prost=0;
        if(st>=poz)
            prost=1;
        //assert(st<poz);
        pll val=getval(B[poz]-B[st],poz-st);
        setik.erase({{val.first,val.second,poz,1}});
    }
    if(dr!=0)
    {
        //assert(dr>poz);
        pll val=getval(B[dr]-B[poz],dr-poz);
        setik.erase({{val.first,val.second,dr,1}});
    }
    if(st!=0&&dr!=0)
    {
        //assert(st<dr);
        pll val=getval(B[dr]-B[st],dr-st);
        setik.insert({{val.first,val.second,dr,1}});
    }
}
int main()
{
    ios_base::sync_with_stdio(false);
    fin.tie(0);
    fin>>n>>m;
    for(int i=1;i<=n;i++)
    {
        fin>>A[i];
        lines.insert(i);
    }
    for(int i=1;i<=m;i++)
    {
        fin>>B[i];
        cols.insert(i);
    }
    ll cnt=2;
    ll x=n;
    ll y=m;
    for(int i=2;i<=n;i++)
    {
        bool ok=0;
        if(i==305)
            ok=1;
        vector<ll> v={A[i]-A[i-1],1,i,0};
        ll val=v[2];
        setik.insert({{A[i]-A[i-1],1,i,0}});
        //cout<<i<<": "<<setik.count({33,1,306,0})<<'\n';
    }
    //return 0;
    for(int i=2;i<=m;i++)
        setik.insert({{B[i]-B[i-1],1,i,1}});
    ll ans=0;
    while(lines.size()>=2||cols.size()>=2)
    {
        bool ok=0;
        int lg=(int)lines.size()+(int)cols.size()-2;
        int L=setik.size();
        if(setik.size()!=(int)lines.size()+(int)cols.size()-2)
            ok=1;
        assert(!setik.empty());
        auto it=prev(setik.end());
        if((*it).v[3]==0) /// linie
        {
            ll poz=(*it).v[2];
            if(poz==x)
                cnt--;
            if(cnt==0)
            {
                ll aux=*prev(cols.end());
                ans+=(y-aux)*A[poz];
                y=aux;
                cnt=1;
            }
            elimlin(poz);
        }
        else /// coloana
        {
            ll poz=(*it).v[2];
            if(poz==y)
                cnt--;
            if(cnt==0)
            {
                ll aux=*prev(lines.end());
                ans+=(x-aux)*B[poz];
                x=aux;
                cnt=1;
            }
            elimcol(poz);
        }
    }
    ans+=(x-1)*B[1]+(y-1)*A[1];
    fout<<ans;
    return 0;
}

Compilation message

kyoto.cpp: In function 'void elimlin(ll)':
kyoto.cpp:49:14: warning: variable 'prost' set but not used [-Wunused-but-set-variable]
   49 |         bool prost=0;
      |              ^~~~~
kyoto.cpp: In function 'void elimcol(ll)':
kyoto.cpp:90:14: warning: variable 'prost' set but not used [-Wunused-but-set-variable]
   90 |         bool prost=0;
      |              ^~~~~
kyoto.cpp:71:10: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
   71 |     bool ok=0;
      |          ^~
kyoto.cpp: In function 'int main()':
kyoto.cpp:130:14: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
  130 |         bool ok=0;
      |              ^~
kyoto.cpp:134:12: warning: unused variable 'val' [-Wunused-variable]
  134 |         ll val=v[2];
      |            ^~~
kyoto.cpp:147:24: warning: comparison of integer expressions of different signedness: 'std::multiset<date>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  147 |         if(setik.size()!=(int)lines.size()+(int)cols.size()-2)
      |            ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kyoto.cpp:144:14: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
  144 |         bool ok=0;
      |              ^~
kyoto.cpp:145:13: warning: unused variable 'lg' [-Wunused-variable]
  145 |         int lg=(int)lines.size()+(int)cols.size()-2;
      |             ^~
kyoto.cpp:146:13: warning: unused variable 'L' [-Wunused-variable]
  146 |         int L=setik.size();
      |             ^
In file included from /usr/include/c++/10/string:48,
                 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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_function.h: In instantiation of 'constexpr bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = date]':
/usr/include/c++/10/bits/stl_tree.h:2003:30:   required from 'std::pair<std::_Rb_tree_iterator<_Val>, std::_Rb_tree_iterator<_Val> > std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::equal_range(const _Key&) [with _Key = date; _Val = date; _KeyOfValue = std::_Identity<date>; _Compare = std::less<date>; _Alloc = std::allocator<date>]'
/usr/include/c++/10/bits/stl_tree.h:2540:49:   required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::erase(const _Key&) [with _Key = date; _Val = date; _KeyOfValue = std::_Identity<date>; _Compare = std::less<date>; _Alloc = std::allocator<date>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type = long unsigned int]'
/usr/include/c++/10/bits/stl_multiset.h:670:26:   required from 'std::multiset<_Key, _Compare, _Alloc>::size_type std::multiset<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = date; _Compare = std::less<date>; _Alloc = std::allocator<date>; std::multiset<_Key, _Compare, _Alloc>::size_type = long unsigned int; std::multiset<_Key, _Compare, _Alloc>::key_type = date]'
kyoto.cpp:54:51:   required from here
/usr/include/c++/10/bits/stl_function.h:386:20: error: no match for 'operator<' (operand types are 'const date' and 'const date')
  386 |       { return __x < __y; }
      |                ~~~~^~~~~
kyoto.cpp:15:10: note: candidate: 'bool date::operator<(date)' (near match)
   15 |     bool operator < (date b)
      |          ^~~~~~~~
kyoto.cpp:15:10: note:   passing 'const date*' as 'this' argument discards qualifiers
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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:489:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
  489 |     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:489:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/string:48,
                 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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_function.h:386:20: note:   'const date' is not derived from 'const std::pair<_T1, _T2>'
  386 |       { return __x < __y; }
      |                ~~~~^~~~~
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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:366:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)'
  366 |     operator<(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:366:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/string:48,
                 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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_function.h:386:20: note:   'const date' is not derived from 'const std::reverse_iterator<_Iterator>'
  386 |       { return __x < __y; }
      |                ~~~~^~~~~
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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:404:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
  404 |     operator<(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:404:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/string:48,
                 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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_function.h:386:20: note:   'const date' is not derived from 'const std::reverse_iterator<_Iterator>'
  386 |       { return __x < __y; }
      |                ~~~~^~~~~
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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1451:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
 1451 |     operator<(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1451:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/string:48,
                 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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_function.h:386:20: note:   'const date' is not derived from 'const std::move_iterator<_IteratorL>'
  386 |       { return __x < __y; }
      |                ~~~~^~~~~
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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1507:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)'
 1507 |     operator<(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1507:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/string:48,
                 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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_function.h:386:20: note:   'const date' is not derived from 'const std::move_iterator<_IteratorL>'
  386 |       { return __x < __y; }
      |                ~~~~^~~~~
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 kyoto.cpp:1:
/usr/include/c++/10/string_view:544:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(std::basic_string_view<_CharT, _Traits>, std::basic_string_view<_CharT, _Traits>)'
  544 |     operator< (basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/10/string_view:544:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/string:48,
                 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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_function.h:386:20: note:   'date' is not derived from 'std::basic_string_view<_CharT, _Traits>'
  386 |       { return __x < __y; }
      |                ~~~~^~~~~
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 kyoto.cpp:1:
/usr/include/c++/10/string_view:550: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> >)'
  550 |     operator< (basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/10/string_view:550:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/string:48,
                 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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_function.h:386:20: note:   'date' is not derived from 'std::basic_string_view<_CharT, _Traits>'
  386 |       { return __x < __y; }
      |                ~~~~^~~~~
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 kyoto.cpp:1:
/usr/include/c++/10/string_view:557: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>)'
  557 |     operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
      |     ^~~~~~~~
/usr/include/c++/10/string_view:557:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/string:48,
                 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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_function.h:386:20: note:   'date' is not derived from 'std::basic_string_view<_CharT, _Traits>'
  386 |       { return __x < __y; }
      |                ~~~~^~~~~
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 kyoto.cpp:1:
/usr/include/c++/10/bits/basic_string.h:6267: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>&)'
 6267 |     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6267:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/string:48,
                 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 kyoto.cpp:1:
/usr/include/c++/10/bits/stl_function.h:386:20: note:   'const date' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
  386 |       { return __x < __y; }
      |                ~~~~^~~~~
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 kyoto.cpp:1:
/usr/include/c++/10/bits/basic_string.h:6280:5: note: candidate: 'template<cla