185972025-10-28 12:12:38WellLeopardUsually20G (40 pont)python3Wrong answer 0/40400ms15144 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:
            print(output)
            previous_i = i    
SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/016ms3124 KiB
2Time limit exceeded0/0384ms15144 KiB
3Wrong answer0/214ms2928 KiB
4Wrong answer0/216ms3124 KiB
5Wrong answer0/224ms3400 KiB
6Wrong answer0/2130ms3124 KiB
7Time limit exceeded0/3379ms3368 KiB
8Time limit exceeded0/3372ms14896 KiB
9Time limit exceeded0/3388ms14896 KiB
10Time limit exceeded0/3384ms14896 KiB
11Wrong answer0/4151ms14916 KiB
12Time limit exceeded0/4389ms14820 KiB
13Wrong answer0/4152ms14852 KiB
14Time limit exceeded0/4400ms14828 KiB
15Time limit exceeded0/4382ms14892 KiB