试题
代码
m
, n
= [int(i
) for i
in input().split
()]
dict = {}
for i
in range(m
):
line
= input().split
()
x
, y
, t
= line
x
, y
= int(x
), int(y
)
dict[(x
, y
)] = t
for i
in range(n
):
setSmall
= set()
setBig
= set()
line
= input().split
()
a
, b
, c
= [int(i
) for i
in line
]
for k
, v
in dict.items
():
x
, y
= k
[0], k
[1]
if a
+ b
*x
+ c
*y
< 0:
setSmall
.add
(v
)
else:
setBig
.add
(v
)
if len(setSmall
) == len(setBig
) == 1:
print('Yes')
else:
print('No')
转载请注明原文地址:https://tech.qufami.com/read-1124.html