#include #include //#define USE_BUFFER_IO #ifdef USE_BUFFER_IO #include "optimization.h" #else #include #endif namespace template_io { namespace meta { template struct type_list { }; template class make_n_list { template> struct impl; template struct impl> { template using wrap = T; using type = type_list...>; }; public: using type = typename impl<>::type; }; template using make_n_list_t = typename make_n_list::type; template struct head { using type = T; }; template using head_t = typename head::type; } namespace input { template struct reader { }; #ifdef USE_BUFFER_IO template struct reader>> { static auto func() { return readInt(); } }; template<> struct reader { static auto func() { return readDouble(); } }; #else template struct reader>> { static auto func() { T x; std::cin >> x; return x; } }; template<> struct reader { static auto func() { double x; std::cin >> x; return x; } }; #endif template= 1>> auto read() { if constexpr (sizeof...(Ts) == 1) { return reader>::func(); } else { return std::make_tuple(read()...); } } template= 1>> auto read(meta::type_list) { return read(); } template auto read() { return read(meta::make_n_list_t()); } struct read_s { template operator T() { return read(); } }; auto read() { return read_s(); } } namespace output { template struct writer { }; #ifdef USE_BUFFER_IO template struct writer>> { static void func(const T& t, char end) { writeInt(t, end); } }; template<> struct writer { static auto func(double d, char end) { writeDouble(d); if (end) writeChar(end); } }; #else template struct writer>> { static void func(const T& t, char end) { std::cout << t << end; } }; template<> struct writer { static auto func(double d, char end) { std::cout << d << end; } }; #endif template void write(T t, char end = '\0') { return writer::func(t, end); } } using input::read, output::write; } using template_io::read, template_io::write; int main() { auto[a, b, c] = read<3, unsigned long>(); auto[d, e] = read(); size_t f = read(); write(a, '\n'); write(b, '\n'); write(c, '\n'); write(d, '\n'); write(e, '\n'); write(f, '\n'); }