Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.025 s | 3 KBi |
#2 |
Incorrecto
|
0.024 s | 3 KBi |
#3 |
Incorrecto
|
0.025 s | 3 KBi |
#4 |
Incorrecto
|
0.024 s | 3 KBi |
#5 |
Incorrecto
|
0.028 s | 3 KBi |
#6 |
Incorrecto
|
0.403 s | 38 KBi |
#7 |
Incorrecto
|
0.382 s | 13 KBi |
#8 |
Incorrecto
|
0.433 s | 52 KBi |
#9 |
Incorrecto
|
0.522 s | 12 KBi |
#10 |
Incorrecto
|
0.491 s | 54 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))