src/util/alias/others/lib.hpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "../../consts/lib.hpp" | ||
| 4 | |||
| 5 | namespace tifa_libs { | ||
| 6 | |||
| 7 | template <class T> | ||
| 8 | struct chash { | ||
| 9 | CEXP static u64 C = u64(pi_v<f128> * 2e18) | 71; | ||
| 10 | 710181527 | CEXP u64 operator()(T x) CNE { return __builtin_bswap64(((u64)x ^ TIME) * C); } | |
| 11 | }; | ||
| 12 | // clang-format off | ||
| 13 | #define mk_(w, t) using w = t; using c##w = const t; | ||
| 14 | mk_(strn, std::string) mk_(strnv, std::string_view) | ||
| 15 | #undef mk_ | ||
| 16 |
55/56tifa_libs::edge_t<long double>::operator<=>(tifa_libs::edge_t<long double> const&) const:
✓ Branch 0 taken 5304790 times.
✓ Branch 1 taken 578000 times.
✓ Branch 2 taken 370648 times.
✓ Branch 3 taken 4934142 times.
✓ Branch 4 taken 4934142 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5304790 times.
✓ Branch 8 taken 578000 times.
✓ Branch 9 taken 534857 times.
✓ Branch 10 taken 43143 times.
✓ Branch 11 taken 374335 times.
✓ Branch 12 taken 160522 times.
✓ Branch 15 taken 534857 times.
✓ Branch 16 taken 43143 times.
✓ Branch 17 taken 22728 times.
✓ Branch 18 taken 20415 times.
✓ Branch 19 taken 19702 times.
✓ Branch 20 taken 3026 times.
✓ Branch 23 taken 22728 times.
✓ Branch 24 taken 20415 times.
tifa_libs::edge_t<long>::operator<=>(tifa_libs::edge_t<long> const&) const:
✓ Branch 0 taken 152161982 times.
✓ Branch 1 taken 34236329 times.
✓ Branch 2 taken 96083402 times.
✓ Branch 3 taken 56078580 times.
✓ Branch 5 taken 152161982 times.
✓ Branch 6 taken 34236329 times.
✓ Branch 7 taken 33049226 times.
✓ Branch 8 taken 1187103 times.
✓ Branch 9 taken 20620349 times.
✓ Branch 10 taken 12428877 times.
✓ Branch 12 taken 33049226 times.
✓ Branch 13 taken 1187103 times.
✓ Branch 14 taken 421301 times.
✓ Branch 15 taken 765802 times.
✓ Branch 16 taken 214321 times.
✓ Branch 17 taken 206980 times.
✓ Branch 19 taken 421301 times.
✓ Branch 20 taken 765802 times.
tifa_libs::edge_t<unsigned int>::operator<=>(tifa_libs::edge_t<unsigned int> const&) const:
✓ Branch 0 taken 573909505 times.
✓ Branch 1 taken 118266681 times.
✓ Branch 2 taken 315518866 times.
✓ Branch 3 taken 258390639 times.
✓ Branch 5 taken 573909505 times.
✓ Branch 6 taken 118266681 times.
✓ Branch 7 taken 89224778 times.
✓ Branch 8 taken 29041903 times.
✓ Branch 9 taken 50438017 times.
✓ Branch 10 taken 38786761 times.
✓ Branch 12 taken 89224778 times.
✓ Branch 13 taken 29041903 times.
✓ Branch 14 taken 10552917 times.
✓ Branch 15 taken 18488986 times.
✓ Branch 16 taken 6443474 times.
✓ Branch 17 taken 4109443 times.
✓ Branch 19 taken 10552917 times.
✓ Branch 20 taken 18488986 times.
|
1087085649 | template <class T> struct edge_t { T w; u32 u, v; CEXP auto operator<=>(edge_t CR) const = default; }; template <class T> using cedge_t = const edge_t<T>; |
| 17 |
18/18✓ Branch 0 taken 13248212 times.
✓ Branch 1 taken 42787833 times.
✓ Branch 2 taken 5108175 times.
✓ Branch 3 taken 8140037 times.
✓ Branch 5 taken 13248212 times.
✓ Branch 6 taken 42787833 times.
✓ Branch 7 taken 40814771 times.
✓ Branch 8 taken 1973062 times.
✓ Branch 9 taken 27787421 times.
✓ Branch 10 taken 13027350 times.
✓ Branch 12 taken 40814771 times.
✓ Branch 13 taken 1973062 times.
✓ Branch 14 taken 1972082 times.
✓ Branch 15 taken 980 times.
✓ Branch 16 taken 2 times.
✓ Branch 17 taken 1972080 times.
✓ Branch 19 taken 1972082 times.
✓ Branch 20 taken 980 times.
|
100797920 | template <class T> struct pt3 { T _0, _1, _2; CEXP auto operator<=>(pt3 CR) const = default; }; template <class T> using cpt3 = const pt3<T>; |
| 18 | template <class T> struct pt4 { T _0, _1, _2, _3; CEXP auto operator<=>(pt4 CR) const = default; }; template <class T> using cpt4 = const pt4<T>; | ||
| 19 | #define mkT_(w, t, ...) template <class T> using w = t __VA_OPT__(, ) __VA_ARGS__; template <class T> using c##w = const t __VA_OPT__(, ) __VA_ARGS__; | ||
| 20 | mkT_(ptt, std::pair<T, T>) mkT_(alc, std::pmr::polymorphic_allocator<T>) mkT_(vec, std::vector<T>) mkT_(vvec, vec<vec<T>>) mkT_(v3ec, vvec<vec<T>>) mkT_(vecpt, vec<ptt<T>>) mkT_(vvecpt, vvec<ptt<T>>) mkT_(ptvec, ptt<vec<T>>) mkT_(ptvvec, ptt<vvec<T>>) | ||
| 21 | #undef mkT_ | ||
| 22 | template <class T> using itl = std ::initializer_list<T>; | ||
| 23 | template <class T, usz ext = std::dynamic_extent> using spn = std::span<T const, ext>; | ||
| 24 | template <class T, usz N> using arr = std::array<T, N>; template <class T, usz N> using carr = std::array<const T, N>; | ||
| 25 | template <class U, class T> using vecp = vec<std::pair<U, T>>; template <class U, class T> using vvecp = vvec<std::pair<U, T>>; | ||
| 26 | template <class U, class T> using vvecp = vvec<std::pair<U, T>>; template <class U, class T> using vvvecp = vvec<vvec<std::pair<U, T>>>; | ||
| 27 | #ifdef PB_DS_ASSOC_CNTNR_HPP | ||
| 28 | template <class T, class C = std::less<T>> using set = __gnu_pbds::tree<T, __gnu_pbds::null_type, C>; | ||
| 29 | template <class K, class V, class C = std::less<K>> using map = __gnu_pbds::tree<K, V, C>; | ||
| 30 | // hset<u64> s({}, {}, {}, {}, {1<<16}); | ||
| 31 | template <class T, class HF = chash<T>> using hset = __gnu_pbds::gp_hash_table<T, __gnu_pbds::null_type, HF>; | ||
| 32 | // hmap<u64, int> s({}, {}, {}, {}, {1<<16}); | ||
| 33 | template <class K, class V, class HF = chash<K>> using hmap = __gnu_pbds::gp_hash_table<K, V, HF>; | ||
| 34 | #else | ||
| 35 | using std::set, std::map; | ||
| 36 | template <class T, class HF = chash<T>> using hset = std::unordered_set<T, HF>; | ||
| 37 | template <class K, class V, class HF = chash<K>> using hmap = std::unordered_map<K, V, HF>; | ||
| 38 | #endif | ||
| 39 | #ifdef PB_DS_PRIORITY_QUEUE_HPP | ||
| 40 | template <class T, class C = std::less<T>> using pq = __gnu_pbds::priority_queue<T, C>; | ||
| 41 | #else | ||
| 42 | template <class T, class C = std::less<T>> using pq = std::priority_queue<T, vec<T>, C>; | ||
| 43 | #endif | ||
| 44 | template <class T> using pqg = pq<T, std::greater<T>>; | ||
| 45 | // clang-format on | ||
| 46 | #define mk1_(V, A, T) using V##A = V<T>; | ||
| 47 | #define mk_(V, A, T) mk1_(V, A, T) mk1_(c##V, A, T) | ||
| 48 | #define mk(A, T) mk_(edge_t, A, T) mk_(ptt, A, T) mk_(pt3, A, T) mk_(pt4, A, T) mk_(vec, A, T) mk_(vvec, A, T) mk_(v3ec, A, T) mk_(vecpt, A, T) mk_(vvecpt, A, T) mk_(ptvec, A, T) mk_(ptvvec, A, T) mk1_(spn, A, T) mk1_(itl, A, T) | ||
| 49 | mk(b, bool) mk(c, chr) mk(i, i32) mk(u, u32) mk(ii, i64) mk(uu, u64) mk(t, isz) mk(z, usz) mk(f, f32) mk(d, f64) mk(s, strn); | ||
| 50 | #undef mk | ||
| 51 | #undef mk_ | ||
| 52 | #undef mk1_ | ||
| 53 | |||
| 54 | } // namespace tifa_libs | ||
| 55 |