Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.02 s | 3 KBi |
#2 |
Incorrecto
|
0.019 s | 3 KBi |
#3 |
Correcto
|
0.021 s | 3 KBi |
#4 |
Correcto
|
0.02 s | 3 KBi |
#5 |
Incorrecto
|
0.02 s | 3 KBi |
#6 |
Incorrecto
|
0.358 s | 46 KBi |
#7 |
Correcto
|
0.324 s | 42 KBi |
#8 |
Correcto
|
0.471 s | 57 KBi |
#9 |
Incorrecto
|
0.401 s | 46 KBi |
#10 |
Incorrecto
|
0.358 s | 58 KBi |
cases = int(input()) for c in range(0, cases): n = int(input()) a = list(map(int, input().split(" "))) max_a = 0 output = [] for i in range(len(a) - 1, -1, -1): if a[i] >= max_a: output.append(-1) max_a = a[i] else: output.append(max_a) output = reversed(list(map(str, output))) print("Case #%d: %s" % (c + 1, " ".join(output)))