This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| constexpr uint64_t lo(uint64_t x) { return x & UINT64_C(0xffffffff); } | |
| constexpr uint64_t hi(uint64_t x) { return x >> 32; } | |
| constexpr uint64_t mulu64(uint64_t a, uint64_t b) | |
| { | |
| return lo(lo(a) * lo(b)) | |
| + (lo(hi(lo(a) * lo(b)) | |
| + lo(a) * hi(b) | |
| + hi(a) * lo(b)) << 32); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstddef> | |
| #include <iostream> | |
| #include <type_traits> | |
| #include <utility> | |
| using namespace std; | |
| template <typename T, T Start, T... Ts> | |
| const auto& make_int_range_helper(std::integer_sequence<T, Ts...>) { | |
| static const initializer_list<int> il{ (Start+Ts)...}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <algorithm> | |
| #include <array> | |
| #include <chrono> | |
| #include <functional> | |
| #include <iostream> | |
| #include <iterator> | |
| #include <limits> | |
| #include <random> | |
| #include <type_traits> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <algorithm> | |
| #include <cstddef> | |
| #include <iterator> | |
| #include <type_traits> | |
| #include <utility> | |
| using namespace std; | |
| template <typename InputIt, typename OutputIt, | |
| typename FwdIt, typename F> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifdef _MSC_VER | |
| #define _CRT_SECURE_NO_WARNINGS | |
| #endif | |
| #include <algorithm> | |
| #include <chrono> | |
| #include <ctime> | |
| #include <iomanip> | |
| #include <iostream> | |
| #include <sstream> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstddef> | |
| #include <cstring> | |
| #include <cwctype> | |
| #include <functional> | |
| #include <iostream> | |
| #include <string> | |
| #include <tuple> | |
| #include <type_traits> | |
| #include <utility> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <eggs/variant.hpp> | |
| #include <cstddef> | |
| #include <iomanip> | |
| #include <iostream> | |
| #include <map> | |
| #include <sstream> | |
| #include <string> | |
| #include <utility> | |
| #include <vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <algorithm> | |
| #include <cassert> | |
| #include <iostream> | |
| #include <iterator> | |
| #include <map> | |
| #include <numeric> | |
| #include <sstream> | |
| #include <string> | |
| #include <utility> | |
| #include <vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <algorithm> | |
| #include <iostream> | |
| #include <iterator> | |
| #include <string> | |
| #include <utility> | |
| using namespace std; | |
| template <typename FwdIt1, typename FwdIt2, typename T> | |
| std::pair<FwdIt1, FwdIt1> find_delimited( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <functional> | |
| #include <iostream> | |
| #include <string> | |
| #include <tuple> | |
| #include <type_traits> | |
| using namespace std; | |
| // ----------------------------------------------------------------------------- | |
| // A silly (in C++) application of the Curry-Howard isomorphism to produce the |