Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.026 s | 3 KBi |
#2 |
Incorrecto
|
0.028 s | 3 KBi |
#3 |
Incorrecto
|
0.029 s | 3 KBi |
#4 |
Incorrecto
|
0.024 s | 3 KBi |
#5 |
Incorrecto
|
0.03 s | 4 KBi |
#6 |
Incorrecto
|
0.413 s | 39 KBi |
#7 |
Incorrecto
|
0.392 s | 13 KBi |
#8 |
Incorrecto
|
0.477 s | 52 KBi |
#9 |
Incorrecto
|
0.412 s | 13 KBi |
#10 |
Incorrecto
|
0.55 s | 55 KBi |
def mirar_horizonte(alturas): max_alt = 0 salidas = [None]*len(alturas) for i in reversed(range(len(alturas))): altura_act = alturas[i] if altura_act>max_alt: max_alt = altura_act if alturas[i] == max_alt: salidas[i] = -1 else: salidas[i] = max_alt return salidas def print_case(case_index, answer): print(f"Case #{case_index+1}:", end="") for x in answer: print(f" x", end="") # mirando al horizonte # 0xcf - Mirando al horizonte C = int(input()) for case in range(C): N = int(input()) alturas = [int(x) for x in input().split()] print_case(case, mirar_horizonte(alturas))