Advertisement
Haunted_Cpp

Tecla 2018 - Treino #H

Jan 16th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. x0, y0 = map(int,input().split())
  2.  
  3. x1, y1 = map(int,input().split())
  4. x2, y2 = map(int,input().split())
  5.  
  6. contador = 0
  7.  
  8. if x1 > x2:
  9.     if y1 > y2:
  10.  
  11.         if x0 > x2 and x0 < x1:
  12.             if y0 > y2 and y0 < y1:
  13.                 contador += 1
  14.  
  15.     else:
  16.        
  17.         if x0 > x2 and x0 < x1:
  18.             if y0 < y2 and y0 > y1:
  19.                 contador += 1
  20.  
  21. else:
  22.     if y1 > y2:
  23.          
  24.         if x0 < x2 and x0 > x1:
  25.             if y0 > y2 and y0 < y1:
  26.                 contador += 1
  27.              
  28.     else:
  29.  
  30.         if x0 < x2 and x0 > x1:
  31.             if y0 < y2 and y0 > y1:
  32.                 contador += 1
  33.  
  34. print(contador)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement