답안 #678803

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
678803 2023-01-06T15:21:37 Z pls33 메기 농장 (IOI22_fish) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#ifndef _AAAAAAAAA
#include "fish.h"
#endif

using namespace std;
using namespace __gnu_pbds;

#pragma region dalykai
using p32 = pair<int, int>;
using p32u = pair<uint32_t, uint32_t>;
using p64 = pair<int64_t, int64_t>;
using p64u = pair<uint64_t, uint64_t>;
using vi16 = vector<int16_t>;
using vi16u = vector<uint16_t>;
using vi32 = vector<int>;
using vi32u = vector<uint32_t>;
using vi64 = vector<int64_t>;
using vi64u = vector<uint64_t>;
using vp32 = vector<p32>;
using vp32u = vector<p32u>;
using vp64 = vector<p64>;
using vp64u = vector<p64u>;
using vvi32 = vector<vi32>;
using vvi32u = vector<vi32u>;
using vvi64 = vector<vi64>;
using vvi64u = vector<vi64u>;
using vvp32 = vector<vp32>;
using vvp32u = vector<vp32u>;
using vvp64 = vector<vp64>;
using vvp64u = vector<vp64u>;
#pragma endregion

using map_t = gp_hash_table<int64_t, int64_t>;

struct node_t
{
    int64_t val;
    p32 range;
    node_t *left, *right;

    node_t(p32 r)
    {
        val = 0;
        range = r;
        left = nullptr;
        right = nullptr;
    }

    void update()
    {
        if (!right || range.second - range.first == 1)
        {
            return;
        }

        val = max(left->val, right->val);
    }

    void expand()
    {
        if (range.second - range.first == 1 || right)
        {
            return;
        }

        int mid = (range.first + range.second) / 2;
        left = new node_t({range.first, mid});
        right = new node_t({mid, range.second});
    }

    int contains(p32 query)
    {
        if (query.first >= range.second || query.second <= range.first)
        {
            return 0;
        }

        if (range.first >= query.first && range.second <= query.second)
        {
            return 1;
        }

        return 2;
    }
};

void update(node_t *node, int64_t val, p32 dest)
{
    if (!node || !node->contains(dest))
    {
        return;
    }

    if (node->contains(dest) == 1)
    {
        node->val = max(node->val, val);
        return;
    }

    node->expand();
    update(node->left, val, dest);
    update(node->right, val, dest);
    node->update();
}

int64_t query(node_t *node, p32 dest)
{
    if (!node || !node->contains(dest))
    {
        return 0;
    }

    if (node->contains(dest) == 1)
    {
        return node->val;
    }

    return max(query(node->left, dest),
               query(node->right, dest));
}

void assign_max(int64_t val, int64_t &v)
{
    v = max(v, val);
}

int64_t weight_sum(int i, int j, vvi64 &prefix, int row)
{
    if (i == -1)
    {
        return 0;
    }

    int64_t sum = prefix[row][j];

    if (i)
    {
        sum -= prefix[row][i - 1];
    }

    return sum;
}

int64_t new_weight(p32 lhs, p32 rhs, vvi64 &prefix)
{
    int64_t left = rhs.first > 0
                       ? weight_sum(0, rhs.second, prefix, rhs.first - 1)
                       : 0;

    int64_t right = (rhs.first + 1 < (int)prefix.size())
                        ? weight_sum(0, rhs.second, prefix, rhs.first + 1)
                        : 0;

    if (lhs.first == -1)
    {
        return left + right;
    }

    if (rhs.first - lhs.first > 2)
    {
        return left + right;
    }

    if (rhs.first - lhs.first == 2)
    {
        if (lhs.second >= rhs.second)
        {
            return right;
        }
        left -= weight_sum(0, lhs.second, prefix, rhs.first - 1);
        return left + right;
    }

    if (lhs.second > rhs.second)
    {
        left = -weight_sum(0, rhs.second, prefix, rhs.first);
        return left + right;
    }

    left -= weight_sum(0, lhs.second, prefix, rhs.first) +
            weight_sum(0, lhs.second, prefix, rhs.first - 1);
    return left + right;
}

long long max_weights(int N, int M,
                      std::vector<int> X,
                      std::vector<int> Y,
                      std::vector<int> W)
{
    vp32 fish;

    int max_y = 0;
    for (int i = 0; i < M; i++)
    {
        max_y = max(max_y, Y[i]);
        if (X[i])
        {
            fish.push_back({X[i] - 1, Y[i]});
        }
        if (X[i] < N - 1)
        {
            fish.push_back({X[i] + 1, Y[i]});
        }
    }

    vvi64 prefix(N, vi64(max_y + 1));
    for (int i = 0; i < M; i++)
    {
        prefix[X[i]][Y[i]] = W[i];
    }

    for (auto &row : prefix)
    {
        for (int i = 1; i < (int)row.size(); i++)
        {
            row[i] += row[i - 1];
        }
    }

    sort(fish.begin(), fish.end());
    auto it = unique(fish.begin(), fish.end());
    fish.erase(it, fish.end());

    map_t decrease({}, {}, {}, {}, {1ULL << bit_width((uint32_t)M)});
    map_t increase({}, {}, {}, {}, {1ULL << bit_width((uint32_t)M)});
    vp32 check;

    node_t *fish_count = new node_t({0, N});
    for (auto &f : fish)
    {
        int64_t initial = new_weight(p32(-1, -1), f, prefix);
        if (f.first > 2)
        {
            initial += query(fish_count, {0, f.first - 2});
        }

        auto &f_inc = increase[f.first * N + f.second];
        auto &f_dec = decrease[f.first * N + f.second];

        assign_max(initial, f_inc);
        assign_max(initial, f_dec);
        check.push_back(f);
        for (int cur = (int)check.size() - 2; cur >= 0; cur--)
        {
            auto &[i, j] = check[cur];
            auto &inc = increase[i * N + j];
            auto &dec = decrease[i * N + j];

            if (f.first - i > 3)
            {
                break;
            }

            if (i == f.first)
            {
                continue;
            }
            int64_t prev = new_weight(p32(i, j), f, prefix);
            if (i == f.first - 1)
            {
                if (j < f.second)
                {
                    assign_max(prev + inc, f_inc);
                }
                else
                {
                    assign_max(prev + dec, f_dec);
                }
            }
            else
            {
                prev += max(inc, dec);
                assign_max(prev, f_inc);
                assign_max(prev, f_dec);
            }
        }

        update(fish_count,
               max(f_inc, f_dec),
               {f.first, f.first + 1});
    }

    return fish_count->val;
}

#ifdef _AAAAAAAAA
int main()
{
    freopen("fish.in", "r", stdin);
#ifndef __linux__
    atexit([]()
           {
        freopen("con", "r", stdin);
        system("pause"); });
#endif

    int N, M;
    assert(2 == scanf("%d %d", &N, &M));

    std::vector<int> X(M), Y(M), W(M);
    for (int i = 0; i < M; ++i)
    {
        assert(3 == scanf("%d %d %d", &X[i], &Y[i], &W[i]));
    }

    long long result = max_weights(N, M, X, Y, W);
    printf("%lld\n", result);
    return 0;
}
#endif

Compilation message

fish.cpp:11: warning: ignoring '#pragma region dalykai' [-Wunknown-pragmas]
   11 | #pragma region dalykai
      | 
fish.cpp:34: warning: ignoring '#pragma endregion ' [-Wunknown-pragmas]
   34 | #pragma endregion
      | 
fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:227:45: error: 'bit_width' was not declared in this scope
  227 |     map_t decrease({}, {}, {}, {}, {1ULL << bit_width((uint32_t)M)});
      |                                             ^~~~~~~~~
fish.cpp:227:68: error: no matching function for call to '__gnu_pbds::gp_hash_table<long int, long int>::gp_hash_table(<brace-enclosed initializer list>, <brace-enclosed initializer list>, <brace-enclosed initializer list>, <brace-enclosed initializer list>, <brace-enclosed initializer list>)'
  227 |     map_t decrease({}, {}, {}, {}, {1ULL << bit_width((uint32_t)M)});
      |                                                                    ^
In file included from fish.cpp:2:
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:497:5: note: candidate: '__gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(const __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>&) [with Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>]'
  497 |     gp_hash_table(const gp_hash_table& other)
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:497:5: note:   candidate expects 1 argument, 5 provided
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:491:5: note: candidate: 'template<class It> __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(It, It, const hash_fn&, const eq_fn&, const comb_probe_fn&, const probe_fn&, const resize_policy&) [with It = It; Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>]'
  491 |     gp_hash_table(It first, It last, const hash_fn& h, const eq_fn& e,
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:491:5: note:   template argument deduction/substitution failed:
fish.cpp:227:68: note:   candidate expects 7 arguments, 5 provided
  227 |     map_t decrease({}, {}, {}, {}, {1ULL << bit_width((uint32_t)M)});
      |                                                                    ^
In file included from fish.cpp:2:
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:475:5: note: candidate: 'template<class It> __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(It, It, const hash_fn&, const eq_fn&, const comb_probe_fn&, const probe_fn&) [with It = It; Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>]'
  475 |     gp_hash_table(It first, It last, const hash_fn& h, const eq_fn& e,
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:475:5: note:   template argument deduction/substitution failed:
fish.cpp:227:68: note:   candidate expects 6 arguments, 5 provided
  227 |     map_t decrease({}, {}, {}, {}, {1ULL << bit_width((uint32_t)M)});
      |                                                                    ^
In file included from fish.cpp:2:
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:461:5: note: candidate: 'template<class It> __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(It, It, const hash_fn&, const eq_fn&, const comb_probe_fn&) [with It = It; Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>]'
  461 |     gp_hash_table(It first, It last, const hash_fn& h, const eq_fn& e,
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:461:5: note:   template argument deduction/substitution failed:
fish.cpp:227:68: note:   couldn't deduce template parameter 'It'
  227 |     map_t decrease({}, {}, {}, {}, {1ULL << bit_width((uint32_t)M)});
      |                                                                    ^
In file included from fish.cpp:2:
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:449:5: note: candidate: 'template<class It> __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(It, It, const hash_fn&, const eq_fn&) [with It = It; Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>]'
  449 |     gp_hash_table(It first, It last, const hash_fn& h, const eq_fn& e)
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:449:5: note:   template argument deduction/substitution failed:
fish.cpp:227:68: note:   candidate expects 4 arguments, 5 provided
  227 |     map_t decrease({}, {}, {}, {}, {1ULL << bit_width((uint32_t)M)});
      |                                                                    ^
In file included from fish.cpp:2:
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:438:5: note: candidate: 'template<class It> __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(It, It, const hash_fn&) [with It = It; Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>]'
  438 |     gp_hash_table(It first, It last, const hash_fn& h)
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:438:5: note:   template argument deduction/substitution failed:
fish.cpp:227:68: note:   candidate expects 3 arguments, 5 provided
  227 |     map_t decrease({}, {}, {}, {}, {1ULL << bit_width((uint32_t)M)});
      |                                                                    ^
In file included from fish.cpp:2:
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:430:5: note: candidate: 'template<class It> __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(It, It) [with It = It; Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>]'
  430 |     gp_hash_table(It first, It last)
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:430:5: note:   template argument deduction/substitution failed:
fish.cpp:227:68: note:   candidate expects 2 arguments, 5 provided
  227 |     map_t decrease({}, {}, {}, {}, {1ULL << bit_width((uint32_t)M)});
      |                                                                    ^
In file included from fish.cpp:2:
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:422:5: note: candidate: '__gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(const hash_fn&, const eq_fn&, const comb_probe_fn&, const probe_fn&, const resize_policy&) [with Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::hash_fn = std::tr1::hash<long int>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::eq_fn = std::equal_to<long int>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::comb_probe_fn = __gnu_pbds::direct_mask_range_hashing<>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::probe_fn = __gnu_pbds::linear_probe_fn<long unsigned int>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::resize_policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>]'
  422 |     gp_hash_table(const hash_fn& h, const eq_fn& e, const comb_probe_fn& cp,
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:423:45: note:   no known conversion for argument 5 from '<brace-enclosed initializer list>' to 'const resize_policy&' {aka 'const __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>&'}
  423 |     const probe_fn& p, const resize_policy& rp)
      |                        ~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:410:5: note: candidate: '__gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(const hash_fn&, const eq_fn&, const comb_probe_fn&, const probe_fn&) [with Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::hash_fn = std::tr1::hash<long int>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::eq_fn = std::equal_to<long int>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::comb_probe_fn = __gnu_pbds::direct_mask_range_hashing<>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::probe_fn = __gnu_pbds::linear_probe_fn<long unsigned int>]'
  410 |     gp_hash_table(const hash_fn& h, const eq_fn& e, const comb_probe_fn& cp,
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:410:5: note:   candidate expects 4 arguments, 5 provided
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:401:5: note: candidate: '__gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(const hash_fn&, const eq_fn&, const comb_probe_fn&) [with Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::hash_fn = std::tr1::hash<long int>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::eq_fn = std::equal_to<long int>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::comb_probe_fn = __gnu_pbds::direct_mask_range_hashing<>]'
  401 |     gp_hash_table(const hash_fn& h, const eq_fn& e, const comb_probe_fn& cp)
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:401:5: note:   candidate expects 3 arguments, 5 provided
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:393:5: note: candidate: '__gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(const hash_fn&, const eq_fn&) [with Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::hash_fn = std::tr1::hash<long int>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::eq_fn = std::equal_to<long int>]'
  393 |     gp_hash_table(const hash_fn& h, const eq_fn& e)
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:393:5: note:   candidate expects 2 arguments, 5 provided
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:386:5: note: candidate: '__gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(const hash_fn&) [with Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>; __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::hash_fn = std::tr1::hash<long int>]'
  386 |     gp_hash_table(const hash_fn& h)
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:386:5: note:   candidate expects 1 argument, 5 provided
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:382:5: note: candidate: '__gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table() [with Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>]'
  382 |     gp_hash_table() { }
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:382:5: note:   candidate expects 0 arguments, 5 provided
fish.cpp:228:68: error: no matching function for call to '__gnu_pbds::gp_hash_table<long int, long int>::gp_hash_table(<brace-enclosed initializer list>, <brace-enclosed initializer list>, <brace-enclosed initializer list>, <brace-enclosed initializer list>, <brace-enclosed initializer list>)'
  228 |     map_t increase({}, {}, {}, {}, {1ULL << bit_width((uint32_t)M)});
      |                                                                    ^
In file included from fish.cpp:2:
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:497:5: note: candidate: '__gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(const __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>&) [with Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<long int>; Eq_Fn = std::equal_to<long int>; Comb_Probe_Fn = __gnu_pbds::direct_mask_range_hashing<>; Probe_Fn = __gnu_pbds::linear_probe_fn<long unsigned int>; Resize_Policy = __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy<>, __gnu_pbds::hash_load_check_resize_trigger<>, false, long unsigned int>; bool Store_Hash = false; _Alloc = std::allocator<char>]'
  497 |     gp_hash_table(const gp_hash_table& other)
      |     ^~~~~~~~~~~~~
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:497:5: note:   candidate expects 1 argument, 5 provided
/usr/include/c++/10/ext/pb_ds/assoc_container.hpp:491:5: note: candidate: 'template<class It> __gnu_pbds::gp_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc>::gp_hash_table(It, It, const hash_fn&, const eq_fn&, const comb_probe_fn&, const probe_fn&, const resize_policy&) [with It = It; Key = long int; Mapped = long int; Hash_Fn = std::tr1::hash<