█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 2865

Problema 0x9d - ¿Está ordenado?

  • Autor: josuedzp
  • Fecha: 2021-02-07 21:01:30 UTC (Hace casi 4 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
#2
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
#3
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
#4
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
#5
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
#6
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
#7
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
#8
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
#9
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
#10
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
#11
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
#12
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n_elementos = int(input())
^
main.c:1:15: error: expected expression
n_elementos = int(input())
              ^
main.c:11:17: error: expected ';' after top level declarator
print(resultado)
                ^
                ;
1 warning and 2 errors generated.

                    
Puntos totales: 0 / 100

Código

n_elementos = int(input())
elementos = [int(x) for x in range(0,len(n_elementos)).input().split()]

resultado = ""
for i in range(0, len(elementos)):
  if i > 0:
    if elementos[i] < elementos[i-1]:
      resultado = "desordenado"
      print(resultado)
resultado = "ordenado"
print(resultado)