From 7f109b08f1791b93f58709b7292714495cb6ca87 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Fri, 6 Jan 2023 11:59:27 +0800 Subject: [PATCH] update: verify common code check --- klotski/main.cc | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/klotski/main.cc b/klotski/main.cc index 659653e..47799b7 100644 --- a/klotski/main.cc +++ b/klotski/main.cc @@ -39,11 +39,29 @@ int main() { // printf("%09lX\n", s.tiny_decode(14323231)); - if (CommonCode::check(0x4FEA13400)) { - std::cout << "true" << std::endl; - } else { - std::cout << "false" << std::endl; +// if (CommonCode::check(0x4FEA13400)) { +// std::cout << "true" << std::endl; +// } else { +// std::cout << "false" << std::endl; +// } + +// uint32_t sum = 0; + for (uint32_t head = 0; head < 1; ++head) { + auto prefix = (uint64_t)head << 32; + for (uint64_t range = 0; range < 0x100000000; ++range) { + uint64_t code = prefix | range; + if (CommonCode::check(code)) { + printf("%09lX\n", code); +// ++sum; + } + +// if (range % 0x1000000 == 0) { +// std::cout << range / 0x1000000 << std::endl; +// } + + } } +// std::cout << "sum: " << sum << std::endl; return 0; }