1
0
Fork 0

Update template.cc

Signed-off-by: subcrip <contact@subc.rip>
This commit is contained in:
subcrip 2024-09-29 21:26:53 +08:00
parent d7f4e60492
commit 29c26e42e7
1 changed files with 20 additions and 57 deletions

View File

@ -265,6 +265,9 @@ return_t qpow(ll b, ll p) {
constexpr inline int lg2(ll x) { return x == 0 ? -1 : sizeof(ll) * 8 - 1 - __builtin_clzll(x); }
template <typename T>
T mygcd(T a, T b) { return b == 0 ? a : mygcd(b, a % b); }
void __exgcd(ll a, ll b, ll& x, ll& y) {
if (b == 0) {
x = 1, y = 0;
@ -472,43 +475,3 @@ constexpr std::array<T, N> __initarray(const T& value) {
return detail::make_array(value, std::make_index_sequence<N>());
}
/*******************************************************/
// #define SINGLE_TEST_CASE
// #define DUMP_TEST_CASE 7219
// #define TOT_TEST_CASE 10000
void dump() {}
void dump_ignore() {}
void prep() {
}
void solve() {
}
int main() {
#if __cplusplus < 201402L or defined(_MSC_VER) and not defined(__clang__)
assert(false && "incompatible compiler variant detected.");
#endif
untie;
prep();
#ifdef SINGLE_TEST_CASE
solve();
#else
read(int, t);
for (int i = 0; i < t; ++i) {
#ifdef DUMP_TEST_CASE
if (t != (TOT_TEST_CASE)) {
solve();
} else if (i + 1 == (DUMP_TEST_CASE)) {
dump();
} else {
dump_ignore();
}
#else
solve();
#endif
}
#endif
}