Name: Seiya Ishibashi
Nationality: Japan
Address: MinatoCity Tokyo Japan
Email: saint.skr@gmail.com
This file contains 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 <iostream> | |
#include <string> | |
#include <set> | |
#include <chrono> | |
#include <random> | |
#include <algorithm> | |
// dst: std::set, std::map, etc | |
// begin & end: iterator of sorted items | |
template<class Tree, class Iterator> |
This file contains 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 <cstdio> | |
// https://www.johndcook.com/blog/2019/11/12/rump-floating-point/ | |
template <typename T> | |
T f(T x, T y) { | |
T x2 = x*x; | |
T y2 = y*y; | |
T y4 = y2*y2; | |
T y6 = y2*y4; | |
T y8 = y2*y6; |
This file contains 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 <cstdio> | |
#include <cstring> | |
#include <utility> | |
template<class T, size_t N> | |
static inline T select_value( | |
std::pair<const char*, T> (&&table)[N], const char* name, T fallback) | |
{ | |
for (auto& kvp : table) { | |
if (std::strcmp(kvp.first, name) == 0) { |
This file contains 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 <iostream> | |
#include <type_traits> | |
#include <utility> | |
#include <tuple> | |
#include <array> | |
#include <vector> | |
#include <list> | |
template<class Iter> | |
struct range_holder |