1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#pragma once

#include <bits/stdc++.h><--- Include file:  not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include "include/template.hpp"


using namespace std::literals;

using std::cin;
using std::cout;

using std::pair;
using std::tuple;

using std::queue;
using std::stack;
using std::priority_queue;

using std::bitset;

using std::ranges::sort;
using std::ranges::reverse;

using std::ranges::min_element;
using std::ranges::max_element;

using std::make_pair;
using std::make_tuple;


using uni::i32;
using uni::u32;
using uni::i64;
using uni::u64;

#ifdef __GNUC__
using uni::i128;
using uni::u128;
#endif

using uni::uint;
using uni::ll;
using uni::ull;
using uni::ld;

using uni::INF32;
using uni::INF64;
using uni::INF;

using uni::MINT;
using uni::INV;
using uni::SINV;

using uni::LN;
using uni::SPC;

using uni::DIRS4;
using uni::DIRS8;
using uni::DIRS4P;
using uni::DIRS8P;

using uni::input_adaptor;
using uni::output_adaptor;

using uni::pow_mod;
using uni::inv_mod;

using uni::spair;

using uni::multi_container;

using uni::modint998244353;
using uni::modint1000000007;
using uni::modint_32;
using uni::modint_64;

using uni::sorted;
using uni::reversed;

using uni::chmin;
using uni::chmax;

using uni::matrix;

using uni::multiset;
using uni::unordered_set;
using uni::unordered_multiset;

using uni::map;
using uni::multimap;
using uni::unordered_map;
using uni::unordered_multimap;

using uni::valarray;
using uni::vector;
using uni::string;
using uni::array;