update
This commit is contained in:
parent
126f225436
commit
0a097a142e
@ -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{};
|
||||||
|
Loading…
Reference in New Issue
Block a user