Submission #802302

# Submission time Handle Problem Language Result Execution time Memory
802302 2023-08-02T11:30:34 Z puppy IOI Fever (JOI21_fever) C++17
Compilation error
0 ms 0 KB
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <functional>
#define int long long
#define all(v) (v).begin(), (v).end()
using namespace std;
struct Dot
{
    int x, y;
};
int N;
Dot dot[100005];
int dir[100005];
int dis[100005][8];
const int inf = 1e18;
vector<pair<int, int>> line[4][100005][4];
vector<pair<int, int>> minor[100005][8];
int id[100005][4];
signed main()
{
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    cin >> N;
    for (int i = 1; i <= N; i++) {
        cin >> dot[i].x >> dot[i].y;
        if (i >= 2) {
            dot[i].x -= dot[1].x;
            dot[i].y -= dot[1].y;
        }
    }
    dot[1] = {0, 0};
    int ans = 0;
    for (int k = 0; k < 4; k++) {
        for (int i = 2; i <= N; i++) {
            if (dot[i].y < dot[i].x && -dot[i].x < dot[i].y) {
                dir[i] = 2;
            }
            else if (dot[i].y >= dot[i].x && dot[i].y > -dot[i].x) {
                dir[i] = 3;
            }
            else if (dot[i].y < dot[i].x && dot[i].y <= -dot[i].x) {
                dir[i] = 1;
            }
            else {
                dir[i] = 0;
            }
        }
        vector<int> cpx[4];
        for (int i = 1; i <= N; i++) {
            cpx[0].push_back(dot[i].y - dot[i].x);
            cpx[1].push_back(dot[i].x + dot[i].y);
            cpx[2].push_back(dot[i].y);
            cpx[3].push_back(dot[i].x);
        }
        for (int k = 0; k < 4; k++) {
            sort(all(cpx[k]));
            cpx[k].erase(unique(all(cpx[k])), cpx[k].end());
        }
        auto lb = [&](int k, int i)
        {
            return lower_bound(all(cpx[k]), i) - cpx[k].begin();
        };
        for (int k = 0; k < 4; k++) {
            for (int i = 0; i < (int)cpx[k].size(); i++) {
                for (int j = 0; j < 4; j++) {
                    line[k][i][j].clear();
                }
            }
        }
        for (int i = 1; i <= N; i++) {
            for (int j = 0; j < 8; j++) {
                minor[i][j].clear();
            }
        }
        for (int i = 1; i <= N; i++) {
            id[i][0] = lb(0, dot[i].y - dot[i].x);
            id[i][1] = lb(1, dot[i].y + dot[i].x);
            id[i][2] = lb(2, dot[i].y);
            id[i][3] = lb(3, dot[i].x);
            line[0][id[i][0]][dir[i]].push_back(make_pair(dot[i].x, i));
            line[1][id[i][1]][dir[i]].push_back(make_pair(dot[i].x, i));
            line[2][id[i][2]][dir[i]].push_back(make_pair(dot[i].x, i));
            line[3][id[i][3]][dir[i]].push_back(make_pair(dot[i].y, i));
        }
        for (int k = 0; k < 4; k++) {
            for (int i = 0; i < (int)cpx[k].size(); i++) {
                for (int j = 0; j < 4; j++) {
                    sort(all(line[k][i][j]));
                    for (int l = 0; l < (int)line[k][i][j].size() - 1; l++) {
                        if (k < 2) {
                            minor[line[k][i][j][l].second][2*k].push_back(make_pair(2 * (line[k][i][j][l+1].first - line[k][i][j][l].first), line[k][i][j][l+1].second));
                            minor[line[k][i][j][l+1].second][2*k+1].push_back(make_pair(2 * (line[k][i][j][l+1].first - line[k][i][j][l].first), line[k][i][j][l].second));
                        }
                        else {
                            minor[line[k][i][j][l].second][2*k].push_back(make_pair(line[k][i][j][l+1].first - line[k][i][j][l].first, line[k][i][j][l+1].second));
                            minor[line[k][i][j][l+1].second][2*k+1].push_back(make_pair(line[k][i][j][l+1].first - line[k][i][j][l].first, line[k][i][j][l].second));
                        }
                    }
                }
            }
        }
        fill(&dis[0][0], &dis[100004][8], inf);
        priority_queue<pair<int, pair<int, int>>> pq; pq.push(make_pair(0, make_pair(1, -1)));
        while (!pq.empty()) {
            int ver = pq.top().second.first, state = pq.top().second.second, now = -pq.top().first;
            pq.pop();
            if (state != -1) {
                for (pair<int, int> p: minor[ver][state]) {
                    int nxt = p.second, newdis = now + p.first;
                    if (dis[nxt][state] > newdis) {
                        dis[nxt][state] = newdis;
                        pq.push(make_pair(-newdis, make_pair(nxt, state)));
                    }
                }
            }
            if (dir[ver] == 0) {
                auto it = lower_bound(all(line[0][id[ver][0]][3]), make_pair(dot[ver].x + (now + 1) / 2, -1));
                if (it != line[0][id[ver][0]][3].end() && dis[(*it).second][0] > 2 * ((*it).first - dot[ver].x)) {
                    dis[(*it).second][0] = 2 * ((*it).first - dot[ver].x);
                    pq.push(make_pair(-dis[(*it).second][0], make_pair((*it).second, 0)));
                }
                auto it2 = lower_bound(all(line[1][id[ver][1]][1]), make_pair(dot[ver].x + (now + 1) / 2, -1));
                if (it2 != line[1][id[ver][1]][1].end() && dis[(*it2).second][2] > 2 * ((*it2).first - dot[ver].x)) {
                    dis[(*it2).second][2] = 2 * ((*it2).first - dot[ver].x);
                    pq.push(make_pair(-dis[(*it2).second][2], make_pair((*it2).second, 2)));
                }
                auto it3 = lower_bound(all(line[2][id[ver][2]][2]), make_pair(dot[ver].x + now, -1));
                if (it3 != line[2][id[ver][2]][2].end() && dis[(*it3).second][4] > (*it3).first - dot[ver].x) {
                    dis[(*it3).second][4] = (*it3).first - dot[ver].x;
                    pq.push(make_pair(-dis[(*it3).second][4], make_pair((*it3).second, 4)));
                }
            }
            else if (dir[ver] == 1) {
                auto it = lower_bound(all(line[0][id[ver][0]][2]), make_pair(dot[ver].x + (now + 1) / 2, -1));
                if (it != line[0][id[ver][0]][2].end() && dis[(*it).second][0] > 2 * ((*it).first - dot[ver].x)) {
                    dis[(*it).second][0] = 2 * ((*it).first - dot[ver].x);
                    pq.push(make_pair(-dis[(*it).second][0], make_pair((*it).second, 0)));
                }
                auto it2 = lower_bound(all(line[1][id[ver][1]][0]), make_pair(dot[ver].x - (now + 1) / 2 + 1, -1));
                if (it2 != line[1][id[ver][1]][0].begin()) {
                    --it2;
                    if (dis[(*it2).second][3] > 2 * (dot[ver].x - (*it2).first)) {
                        dis[(*it2).second][3] = 2 * (dot[ver].x - (*it2).first);
                        pq.push(make_pair(-dis[(*it2).second][3], make_pair((*it2).second, 3)));
                    }
                }
                auto it3 = lower_bound(all(line[3][id[ver][3]][3]), make_pair(dot[ver].y + now, -1));
                if (it3 != line[3][id[ver][3]][3].end() && dis[(*it3).second][6] > (*it3).first - dot[ver].y) {
                    dis[(*it3).second][6] = (*it3).first - dot[ver].y;
                    pq.push(make_pair(-dis[(*it3).second][6], make_pair((*it3).second, 6)));
                }
            }
            else if (dir[ver] == 2) {
                auto it = lower_bound(all(line[0][id[ver][0]][1]), make_pair(dot[ver].x - (now + 1) / 2 + 1, -1));
                if (it != line[0][id[ver][0]][1].begin()) {
                    --it;
                    if (dis[(*it).second][1] > 2 * (dot[ver].x - (*it).first)) {
                        dis[(*it).second][1] = 2 * (dot[ver].x - (*it).first);
                        pq.push(make_pair(-dis[(*it).second][1], make_pair((*it).second, 1)));
                    }
                }
                auto it2 = lower_bound(all(line[1][id[ver][1]][3]), make_pair(dot[ver].x - (now + 1) / 2 + 1, -1));
                if (it2 != line[1][id[ver][1]][3].begin()) {
                    --it2;
                    if (dis[(*it2).second][3] > 2 * (dot[ver].x - (*it2).first)) {
                        dis[(*it2).second][3] = 2 * (dot[ver].x - (*it2).first);
                        pq.push(make_pair(-dis[(*it2).second][3], make_pair((*it2).second, 3)));
                    }
                }
                auto it3 = lower_bound(all(line[2][id[ver][2]][0]), make_pair(dot[ver].x - now + 1, -1));
                if (it3 != line[2][id[ver][2]][0].begin()) {
                    --it3;
                    if (dis[(*it3).second][5] > dot[ver].x - (*it3).first) {
                        dis[(*it3).second][5] = dot[ver].x - (*it3).first;
                        pq.push(make_pair(-dis[(*it3).second][5], make_pair((*it3).second, 5)));
                    }
                }
            }
            else {
                auto it = lower_bound(all(line[0][id[ver][0]][0]), make_pair(dot[ver].x - (now + 1) / 2 + 1, -1));
                if (it != line[0][id[ver][0]][0].begin()) {
                    --it;
                    if (dis[(*it).second][1] > 2 * (dot[ver].x - (*it).first)) {
                        dis[(*it).second][1] = 2 * (dot[ver].x - (*it).first);
                        pq.push(make_pair(-dis[(*it).second][1], make_pair((*it).second, 1)));
                    }
                }
                auto it2 = lower_bound(all(line[1][id[ver][1]][2]), make_pair(dot[ver].x + (now + 1) / 2, -1));
                if (it2 != line[1][id[ver][1]][2].end() && dis[(*it2).second][2] > 2 * ((*it2).first - dot[ver].x)) {
                    dis[(*it2).second][2] = 2 * ((*it).first - dot[ver].x);
                    pq.push(make_pair(-dis[(*it2).second][2], make_pair((*it2).second, 2)));
                }
                auto it3 = lower_bound(all(line[3][id[ver][3]][1]), make_pair(dot[ver].x - now + 1, -1));
                if (it3 != line[3][id[ver][3]][1].begin()) {
                    --it3;
                    if (dis[(*it3).second][7] > dot[ver].y - (*it3).first) {
                        dis[(*it3).second][7] = dot[ver].y - (*it3).first;
                        pq.push(make_pair(-dis[(*it3).second][7], make_pair((*it3).second, 7)));
                    }
                }
            }
        }
        int res = 1;
        for (int i = 2; i <= N; i++) {
            bool flag = false;
            for (int j = 0; j < 8; j++) flag |= dis[i][j] != inf;
            res += flag;
        }
        ans = max(ans, res);
        for (int i = 2; i <= N; i++) {
            int tmp = dot[i].y;
            dot[i].y = dot[i].x;
            dot[i].x = -tmp;
        }
        dir[1] = 0;
    }
    cout << ans << '\n';
}

Compilation message

In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_val::operator()(_Iterator, _Value&) const [with _Iterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Value = const std::pair<long long int, int>]':
/usr/include/c++/10/bits/stl_algobase.h:1324:14:   required from '_ForwardIterator std::__lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Tp = std::pair<long long int, int>; _Compare = __gnu_cxx::__ops::_Iter_less_val]'
/usr/include/c++/10/bits/stl_algobase.h:1359:32:   required from '_ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Tp = std::pair<long long int, int>]'
fever.cpp:118:109:   required from here
/usr/include/c++/10/bits/predefined_ops.h:67:22: error: no match for 'operator<' (operand types are 'std::pair<long long int, long long int>' and 'const std::pair<long long int, int>')
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1096:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator<(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)'
 1096 |     operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1096:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   'std::pair<long long int, long long int>' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1104:5: note: candidate: 'template<class _Iterator, class _Container> bool __gnu_cxx::operator<(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)'
 1104 |     operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1104:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   'std::pair<long long int, long long int>' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.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/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   deduced conflicting types for parameter '_T2' ('long long int' and 'int')
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.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/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   'std::pair<long long int, long long int>' is not derived from 'const std::reverse_iterator<_Iterator>'
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.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/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   'std::pair<long long int, long long int>' is not derived from 'const std::reverse_iterator<_Iterator>'
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.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/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   'std::pair<long long int, long long int>' is not derived from 'const std::move_iterator<_IteratorL>'
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.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/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   'std::pair<long long int, long long int>' is not derived from 'const std::move_iterator<_IteratorL>'
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
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/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.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/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   'std::pair<long long int, long long int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
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/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.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/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   'std::pair<long long int, long long int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
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/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.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/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   'std::pair<long long int, int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
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/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.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/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   'std::pair<long long int, long long int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
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/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/basic_string.h:6280:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
 6280 |     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6280:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   'std::pair<long long int, long long int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   67 |       { return *__it < __val; }
      |                ~~~~~~^~~~~~~
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/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/basic_string.h:6292:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 6292 |     operator<(const _CharT* __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6292:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/ios:40,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from fever.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note:   mismatched types 'const _CharT*' and 'std::pair<long long int, long long int>'
   67 |       { return *__it < __