Browse Source

update: verify common code check

master
Dnomd343 2 years ago
parent
commit
7f109b08f1
  1. 26
      klotski/main.cc

26
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;
}

Loading…
Cancel
Save