z3 compat
This commit is contained in:
parent
509672bc9e
commit
a1bd117b56
|
@ -163,10 +163,12 @@ auto Part2(Input const& input) -> std::int64_t
|
|||
solver.add(constants.at(entry.lvalue) == rhs);
|
||||
}
|
||||
}
|
||||
|
||||
if (solver.check() != z3::sat) {
|
||||
throw std::runtime_error{"no solution to part 2"};
|
||||
}
|
||||
return solver.get_model().eval(constants.at("humn")).as_int64();
|
||||
|
||||
return solver.get_model().eval(constants.at("humn")).get_numeral_int64();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Reference in New Issue
Block a user