import sys def get_buyable(P, money):     curmax = 0     curid = -1     for i in range(len(P)):         if P[i] <= money:             if P[i] > curmax:                 curmax = P[i]                 curid = i     if curid == -1:         return -1, -1     else:         return curid, curmax n = int(sys.stdin.readline().strip()) values = [] for i in range(n):     k = int(sys.stdin.readline().strip())     line = sys.stdin.readline().strip()     P = list(map(int, line.split()))     values.append(P)     q = int(sys.stdin.readline().strip())     Q = []     for j in range(q):         line = sys.stdin.readline().strip()         x, y, z = list(map(int, line.split()))         money = x * y * z         curid, curmax = get_buyable(P, money)         if curid == -1:             print(-1)         else:             print(curid + 1, curmax) 我怀疑过价格是不是从小到大,可以二分查找,但我试了2分查找,也是超时好吧