Advertisement
Mirbek

БУКВЫ

Feb 4th, 2022
605
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.     double xv, yv, uv;
  7.     double xh, yh, uh;
  8.  
  9.     cin >> xv >> yv >> uv;
  10.     cin >> xh >> yh >> uh;
  11.  
  12.     uv /= 2;
  13.     uh /= 2;
  14.  
  15.     if (yv - uv < yh && yh < yv + uv) {
  16.         if (xh - uh < xv && xv < xh + uh) {
  17.             cout << "X";
  18.             return 0;
  19.         }
  20.     }
  21.  
  22.     if (yv - uv > yh || yh > yv + uv || xh - uh > xv || xv > xh + uh) {
  23.         cout << "A";
  24.         return 0;
  25.     }
  26.  
  27.     if (yv - uv == yh || yv + uv == yh) {
  28.         if (xh - uh == xv || xh + uh == xv) {
  29.             cout << "L" << endl;
  30.             return 0;
  31.         }
  32.     }
  33.  
  34.     cout << "T";
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement