This commit is contained in:
Zengtudor 2024-09-07 13:53:03 +08:00
parent 126f225436
commit 0a097a142e

View File

@ -1,10 +1,8 @@
#include <any> #include <any>
#include <array> #include <array>
#include <climits>
#include <cstddef> #include <cstddef>
#include <iostream> #include <iostream>
#include <ostream> #include <ostream>
#include <string>
#include <vector> #include <vector>
using namespace std; using namespace std;
@ -13,24 +11,6 @@ typedef int i8;
const u8 MAX = 1e5+1; const u8 MAX = 1e5+1;
template<typename T>
struct std::formatter<std::vector<T>> {
constexpr auto parse(format_parse_context& ctx)const {
return ctx.begin();
}
constexpr auto format(const std::vector<T>& v, auto& ctx)const {
auto out = ctx.out();
std::format_to(out, "[");
for (size_t i = 0; i < v.size(); ++i) {
if (i > 0) {
std::format_to(out, ", ");
}
std::format_to(out, "{}", v[i]);
}
return std::format_to(out, "]");
}
};
constexpr std::array<u8, (size_t)MAX> initLog2() { constexpr std::array<u8, (size_t)MAX> initLog2() {
std::array<u8, (size_t)MAX> log2{}; std::array<u8, (size_t)MAX> log2{};