Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
main.c:1:1: error: unknown type name 'def' def mirar_horizonte(alturas): ^ main.c:1:29: error: expected function body after function declarator def mirar_horizonte(alturas): ^ main.c:2:6: error: invalid preprocessing directive #rev_alturas = alturas[::-1] ^ main.c:25:4: error: GNU line marker directive requires a simple digit sequence # 0xcf - Mirando al horizonte ^ 4 errors generated. |
||
#2 |
Error de compilación
main.c:1:1: error: unknown type name 'def' def mirar_horizonte(alturas): ^ main.c:1:29: error: expected function body after function declarator def mirar_horizonte(alturas): ^ main.c:2:6: error: invalid preprocessing directive #rev_alturas = alturas[::-1] ^ main.c:25:4: error: GNU line marker directive requires a simple digit sequence # 0xcf - Mirando al horizonte ^ 4 errors generated. |
||
#3 |
Error de compilación
main.c:1:1: error: unknown type name 'def' def mirar_horizonte(alturas): ^ main.c:1:29: error: expected function body after function declarator def mirar_horizonte(alturas): ^ main.c:2:6: error: invalid preprocessing directive #rev_alturas = alturas[::-1] ^ main.c:25:4: error: GNU line marker directive requires a simple digit sequence # 0xcf - Mirando al horizonte ^ 4 errors generated. |
||
#4 |
Error de compilación
main.c:1:1: error: unknown type name 'def' def mirar_horizonte(alturas): ^ main.c:1:29: error: expected function body after function declarator def mirar_horizonte(alturas): ^ main.c:2:6: error: invalid preprocessing directive #rev_alturas = alturas[::-1] ^ main.c:25:4: error: GNU line marker directive requires a simple digit sequence # 0xcf - Mirando al horizonte ^ 4 errors generated. |
||
#5 |
Error de compilación
main.c:1:1: error: unknown type name 'def' def mirar_horizonte(alturas): ^ main.c:1:29: error: expected function body after function declarator def mirar_horizonte(alturas): ^ main.c:2:6: error: invalid preprocessing directive #rev_alturas = alturas[::-1] ^ main.c:25:4: error: GNU line marker directive requires a simple digit sequence # 0xcf - Mirando al horizonte ^ 4 errors generated. |
||
#6 |
Error de compilación
main.c:1:1: error: unknown type name 'def' def mirar_horizonte(alturas): ^ main.c:1:29: error: expected function body after function declarator def mirar_horizonte(alturas): ^ main.c:2:6: error: invalid preprocessing directive #rev_alturas = alturas[::-1] ^ main.c:25:4: error: GNU line marker directive requires a simple digit sequence # 0xcf - Mirando al horizonte ^ 4 errors generated. |
||
#7 |
Error de compilación
main.c:1:1: error: unknown type name 'def' def mirar_horizonte(alturas): ^ main.c:1:29: error: expected function body after function declarator def mirar_horizonte(alturas): ^ main.c:2:6: error: invalid preprocessing directive #rev_alturas = alturas[::-1] ^ main.c:25:4: error: GNU line marker directive requires a simple digit sequence # 0xcf - Mirando al horizonte ^ 4 errors generated. |
||
#8 |
Error de compilación
main.c:1:1: error: unknown type name 'def' def mirar_horizonte(alturas): ^ main.c:1:29: error: expected function body after function declarator def mirar_horizonte(alturas): ^ main.c:2:6: error: invalid preprocessing directive #rev_alturas = alturas[::-1] ^ main.c:25:4: error: GNU line marker directive requires a simple digit sequence # 0xcf - Mirando al horizonte ^ 4 errors generated. |
||
#9 |
Error de compilación
main.c:1:1: error: unknown type name 'def' def mirar_horizonte(alturas): ^ main.c:1:29: error: expected function body after function declarator def mirar_horizonte(alturas): ^ main.c:2:6: error: invalid preprocessing directive #rev_alturas = alturas[::-1] ^ main.c:25:4: error: GNU line marker directive requires a simple digit sequence # 0xcf - Mirando al horizonte ^ 4 errors generated. |
||
#10 |
Error de compilación
main.c:1:1: error: unknown type name 'def' def mirar_horizonte(alturas): ^ main.c:1:29: error: expected function body after function declarator def mirar_horizonte(alturas): ^ main.c:2:6: error: invalid preprocessing directive #rev_alturas = alturas[::-1] ^ main.c:25:4: error: GNU line marker directive requires a simple digit sequence # 0xcf - Mirando al horizonte ^ 4 errors generated. |
def mirar_horizonte(alturas): #rev_alturas = alturas[::-1] mas_alto_previo = alturas[-1] mas_altos = [] for i in reversed(range(len(alturas))): altura_actual = alturas[i] if altura_actual>=mas_alto_previo: mas_alto_previo = altura_actual mas_altos.append(mas_alto_previo) salida = [] for i in range(len(alturas)): if alturas[i]==mas_altos[len(alturas)-i-1]: salida.append(-1) else: salida.append(mas_altos[len(alturas)-i-1]) return salida def print_case(case_index, answer): print(f"Case #{case_index+1}:", end=" ") for x in answer: print(x, end=" ") print() # 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))