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

Envío 828

Problema 0x9d - ¿Está ordenado?

  • Autor: javierandresgp
  • Fecha: 2020-09-24 01:12:16 UTC (Hace alrededor de 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]
nElements = int(input())
^
main.c:1:13: error: expected expression
nElements = int(input())
            ^
main.c:8:27: error: expected ';' after top level declarator
    print("Desordenado\n")
                          ^
                          ;
1 warning and 2 errors generated.

                    
#2
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
nElements = int(input())
^
main.c:1:13: error: expected expression
nElements = int(input())
            ^
main.c:8:27: error: expected ';' after top level declarator
    print("Desordenado\n")
                          ^
                          ;
1 warning and 2 errors generated.

                    
#3
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
nElements = int(input())
^
main.c:1:13: error: expected expression
nElements = int(input())
            ^
main.c:8:27: error: expected ';' after top level declarator
    print("Desordenado\n")
                          ^
                          ;
1 warning and 2 errors generated.

                    
#4
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
nElements = int(input())
^
main.c:1:13: error: expected expression
nElements = int(input())
            ^
main.c:8:27: error: expected ';' after top level declarator
    print("Desordenado\n")
                          ^
                          ;
1 warning and 2 errors generated.

                    
#5
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
nElements = int(input())
^
main.c:1:13: error: expected expression
nElements = int(input())
            ^
main.c:8:27: error: expected ';' after top level declarator
    print("Desordenado\n")
                          ^
                          ;
1 warning and 2 errors generated.

                    
#6
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
nElements = int(input())
^
main.c:1:13: error: expected expression
nElements = int(input())
            ^
main.c:8:27: error: expected ';' after top level declarator
    print("Desordenado\n")
                          ^
                          ;
1 warning and 2 errors generated.

                    
#7
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
nElements = int(input())
^
main.c:1:13: error: expected expression
nElements = int(input())
            ^
main.c:8:27: error: expected ';' after top level declarator
    print("Desordenado\n")
                          ^
                          ;
1 warning and 2 errors generated.

                    
#8
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
nElements = int(input())
^
main.c:1:13: error: expected expression
nElements = int(input())
            ^
main.c:8:27: error: expected ';' after top level declarator
    print("Desordenado\n")
                          ^
                          ;
1 warning and 2 errors generated.

                    
#9
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
nElements = int(input())
^
main.c:1:13: error: expected expression
nElements = int(input())
            ^
main.c:8:27: error: expected ';' after top level declarator
    print("Desordenado\n")
                          ^
                          ;
1 warning and 2 errors generated.

                    
#10
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
nElements = int(input())
^
main.c:1:13: error: expected expression
nElements = int(input())
            ^
main.c:8:27: error: expected ';' after top level declarator
    print("Desordenado\n")
                          ^
                          ;
1 warning and 2 errors generated.

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

                    
#12
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
nElements = int(input())
^
main.c:1:13: error: expected expression
nElements = int(input())
            ^
main.c:8:27: error: expected ';' after top level declarator
    print("Desordenado\n")
                          ^
                          ;
1 warning and 2 errors generated.

                    
Puntos totales: 0 / 100

Código

nElements = int(input())
elements = input().rsplit(" ")
ordered = elements.copy()
ordered.sort()
if elements == ordered:
    print("Ordenado\n")
else:
    print("Desordenado\n")