|
@ -25,72 +25,28 @@ using klotski::BasicRanges; |
|
|
|
|
|
|
|
|
void tmain() { |
|
|
void tmain() { |
|
|
|
|
|
|
|
|
// std::vector<CommonCode> ok;
|
|
|
|
|
|
// for (auto &&c : AllCases::release()) {
|
|
|
|
|
|
// if (Group::type_id(c) == 123) {
|
|
|
|
|
|
// ok.emplace_back(c);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// std::cout << ok.size() << std::endl;
|
|
|
|
|
|
|
|
|
|
|
|
// std::cout << Group::all_cases(123).size() << std::endl;
|
|
|
|
|
|
// std::vector<CommonCode> err;
|
|
|
|
|
|
// auto ret = Group::all_cases(123);
|
|
|
|
|
|
// std::cout << ret.size() << std::endl;
|
|
|
|
|
|
// err.reserve(ret.size());
|
|
|
|
|
|
// for (auto &&r : ret) {
|
|
|
|
|
|
// if (Group::type_id(r) != 123) {
|
|
|
|
|
|
// std::cout << r << std::endl;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// err.emplace_back(r);
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// uint32_t sum = 0;
|
|
|
// uint32_t sum = 0;
|
|
|
// for (uint32_t type_id = 0; type_id < 204; ++type_id) {
|
|
|
// for (uint32_t type_id = 0; type_id < 204; ++type_id) {
|
|
|
// sum += Group::all_cases(type_id).size();
|
|
|
// sum += Group::all_cases(type_id).size();
|
|
|
// auto tmp = Group::block_num(type_id);
|
|
|
|
|
|
//
|
|
|
|
|
|
// std::vector<uint32_t> ranges;
|
|
|
|
|
|
//
|
|
|
|
|
|
// BasicRanges::generate(ranges, BasicRanges::generate_t { // generate target ranges
|
|
|
|
|
|
// .n1 = 16 - tmp.n_1x1 - (tmp.n_1x2 + tmp.n_2x1) * 2, /// space -> 00
|
|
|
|
|
|
// .n2 = tmp.n_1x2, /// 1x2 -> 01
|
|
|
|
|
|
// .n3 = tmp.n_2x1, /// 2x1 -> 10
|
|
|
|
|
|
// .n4 = tmp.n_1x1, /// 1x1 -> 11
|
|
|
|
|
|
// });
|
|
|
|
|
|
// sum += ranges.size();
|
|
|
|
|
|
// }
|
|
|
// }
|
|
|
// std::cout << "sum = " << sum << std::endl;
|
|
|
// std::cout << "sum = " << sum << std::endl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t sum = 0; |
|
|
|
|
|
for (uint32_t type_id = 0; type_id < 204; ++type_id) { |
|
|
for (uint32_t type_id = 0; type_id < 204; ++type_id) { |
|
|
sum += Group::all_cases(type_id).size(); |
|
|
|
|
|
} |
|
|
|
|
|
std::cout << "sum = " << sum << std::endl; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<uint64_t> codes; |
|
|
|
|
|
std::vector<uint64_t> codes_; |
|
|
|
|
|
for (auto &&t : Group::all_cases(type_id)) { |
|
|
|
|
|
codes.emplace_back(t.unwrap()); |
|
|
|
|
|
codes_.emplace_back(t.unwrap()); |
|
|
|
|
|
} |
|
|
|
|
|
std::sort(codes.begin(), codes.end()); |
|
|
|
|
|
|
|
|
// auto r = Group::block_num(123);
|
|
|
if (codes != codes_) { |
|
|
|
|
|
std::cout << type_id << std::endl; |
|
|
// std::cout << (int)r.n_1x1 << " " << (int)r.n_1x2 << " " << (int)r.n_2x1 << std::endl;
|
|
|
} |
|
|
|
|
|
// std::cout << (codes == codes_) << std::endl;
|
|
|
// std::cout << Group::type_id(r) << std::endl;
|
|
|
|
|
|
|
|
|
|
|
|
// Group::block_num(CommonCode(0x1A9BF0C00));
|
|
|
|
|
|
// Group::block_num(RawCode::from_common_code(0x1A9BF0C00));
|
|
|
|
|
|
|
|
|
|
|
|
// std::cout << std::endl;
|
|
|
|
|
|
|
|
|
|
|
|
// Group::block_num(CommonCode(0x4FEA13400));
|
|
|
|
|
|
// Group::block_num(RawCode::from_common_code(0x4FEA13400));
|
|
|
|
|
|
|
|
|
|
|
|
// for (auto &&common_code : AllCases::release()) {
|
|
|
} |
|
|
// auto s1 = Group::block_num(common_code);
|
|
|
|
|
|
// auto s2 = Group::block_num(common_code.to_raw_code());
|
|
|
|
|
|
// if (s1.n_1x1 != s2.n_1x1 || s1.n_1x2 != s2.n_1x2 || s1.n_2x1 != s2.n_2x1) {
|
|
|
|
|
|
// std::cout << "fuck" << std::endl;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// auto cases = std::vector<RawCode>();
|
|
|
// auto cases = std::vector<RawCode>();
|
|
|
// auto common_codes = AllCases::release();
|
|
|
// auto common_codes = AllCases::release();
|
|
|