Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.029 s | 3 KBi |
#2 |
Incorrecto
|
0.03 s | 3 KBi |
#3 |
Incorrecto
|
0.028 s | 3 KBi |
#4 |
Incorrecto
|
0.027 s | 3 KBi |
#5 |
Incorrecto
|
0.029 s | 3 KBi |
#6 |
Incorrecto
|
0.027 s | 3 KBi |
#7 |
Incorrecto
|
0.029 s | 4 KBi |
#8 |
Incorrecto
|
0.029 s | 3 KBi |
#9 |
Correcto
|
0.031 s | 3 KBi |
#10 |
Incorrecto
|
0.025 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(len(sarr)) break if not (pt < q): res.append(n) break print('\n'.join([str(s) for s in res]))