a,b,c = map(int, input().split())
x=0
for i in range (b):
d,e=map(int,input().split())
if d==0 and e>0:
x=x+1
else:
if e==0:
x=x
else:
h=a//d
if h*e>c:
x=x+1
else:
x=x
if x==0:
print(-1)
else:
print(x)
以下是输入数据:
98 3 489
45 328
4 85
60 7
系统输出:
1 2
自己输出:
2