Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main(){
- double xv, yv, uv;
- double xh, yh, uh;
- cin >> xv >> yv >> uv;
- cin >> xh >> yh >> uh;
- uv /= 2;
- uh /= 2;
- if (yv - uv < yh && yh < yv + uv) {
- if (xh - uh < xv && xv < xh + uh) {
- cout << "X";
- return 0;
- }
- }
- if (yv - uv > yh || yh > yv + uv || xh - uh > xv || xv > xh + uh) {
- cout << "A";
- return 0;
- }
- if (yv - uv == yh || yv + uv == yh) {
- if (xh - uh == xv || xh + uh == xv) {
- cout << "L" << endl;
- return 0;
- }
- }
- cout << "T";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement