SHARE
TWEET

Untitled

a guest Feb 27th, 2020 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. bool check(double x) {
  6.   return true;
  7. }
  8.  
  9. int main() {
  10.   double l = 0;
  11.   double r = 1e9;
  12.  
  13.   for (int i = 0; i < 64; ++i) {
  14.     double mid = (l + r) / 2;
  15.    
  16.     if (check(mid)) {
  17.       r = mid;
  18.     } else {
  19.       l = mid;
  20.     }
  21.   }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top