186012025-10-28 13:29:47WellLeopardUsually20G (40 pont)python3Wrong answer 2/40115ms15132 KiB
n, q = map(int, input().split())
t = tuple(map(int, input().split()))
m = tuple(int(input()) for _ in range(q))

maxti = 0
maxt = list()
for i in range(n):
    if maxti < t[i]:
        maxti = t[i]
    maxt.append(maxti)
output = 0
previous_i = 0
for mi in m:
    output = 1
    for i in range(previous_i, n):
        if maxt[i] <= mi:
            output += 1
        else:
            print(output)
            previous_i = i - 1
            break
SubtaskSumTestVerdictTimeMemory
base2/40
1Accepted0/016ms3292 KiB
2Wrong answer0/0107ms15132 KiB
3Accepted2/216ms3312 KiB
4Wrong answer0/216ms3124 KiB
5Runtime error0/217ms3132 KiB
6Runtime error0/219ms3176 KiB
7Wrong answer0/320ms3472 KiB
8Wrong answer0/392ms14892 KiB
9Wrong answer0/393ms14964 KiB
10Wrong answer0/397ms14820 KiB
11Wrong answer0/4115ms14900 KiB
12Wrong answer0/493ms14892 KiB
13Wrong answer0/4108ms14896 KiB
14Wrong answer0/4100ms14892 KiB
15Wrong answer0/4108ms14892 KiB