Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- bool check() {
- // TODO
- }
- int main() {
- double l = 0;
- double r = 1e9;
- for (int i = 0; i < 64; ++i) {
- double mid = (l + r) / 2;
- if (check(mid)) {
- r = mid;
- } else {
- l = mid;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement