Advertisement
iskhakovt

Untitled

Oct 31st, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int n;
  9.     double a, b, c, d, e, f, x1, x2;
  10.     cin >> n;
  11.  
  12.     for (int i = 0; i != n; ++i) {
  13.         cin >> a >> b >> c >> d >> e >> f;
  14.         if ((b * b - 3 * a * c) >= 0)
  15.         {
  16.             x1 = (b * b - sqrt(b * b - 3 * a * c)) / 3 / a;
  17.             x2 = (b * b + sqrt(b * b - 3 * a * c)) / 3 / a;
  18.             if ((max(e,f)>x1 && x1>min(e,f)) ^ (max(e,f)>x2 && x2>min(e,f)))
  19.             {
  20.                 if
  21.             }
  22.         }
  23.         else
  24.         {
  25.             // lalka
  26.            
  27.         }
  28.  
  29.        
  30.  
  31.     }
  32.  
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement