Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.029 s | 3 KBi |
#2 |
Correcto
|
0.028 s | 3 KBi |
#3 |
Correcto
|
0.026 s | 3 KBi |
#4 |
Correcto
|
0.03 s | 3 KBi |
#5 |
Correcto
|
0.025 s | 3 KBi |
#6 |
Correcto
|
0.035 s | 3 KBi |
#7 |
Correcto
|
0.034 s | 3 KBi |
#8 |
Correcto
|
0.025 s | 3 KBi |
#9 |
Correcto
|
0.03 s | 3 KBi |
#10 |
Correcto
|
0.029 s | 3 KBi |
n_x = int(input()) arr = [int(o) for o in input().split(' ')] n_c = int(input()) queries = [int(input()) for _ in range(n_c)] sarr = sorted(arr) res = [] for q in queries: for n, pt in enumerate(sarr): if sarr[-1] <= q: res.append(0) break if pt > q: res.append(n_x - n) break print('\n'.join([str(s) for s in res]))