We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d490a0 commit b767174Copy full SHA for b767174
1 file changed
kattis/Forest for the trees/forest.vn.py
@@ -25,13 +25,12 @@
25
y = k*yb
26
27
k += 1
28
- if x>=x1 and x<=x2:
29
- if y>=y1 and y<=y2:
30
- # We are in the rectangle
31
- # We need to get out
32
- # We are out when x is out or y is out
33
- k = min(x2//xb, y2//yb)+1
34
- continue
+ if x1<=x<x2 and y1<=y<=y2:
+ # We are in the rectangle
+ # We need to get out
+ # We are out when x is out or y is out
+ k = min(x2//xb, y2//yb)+1
+ continue
35
36
print("No")
37
print(x, y)
0 commit comments