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

Envío 539

Problema 0x9d - ¿Está ordenado?

  • Autor: cposada8
  • Fecha: 2020-09-07 02:24:17 UTC (Hace más de 4 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
#2
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
#3
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
#4
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
#5
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
#6
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
#7
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
#8
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
#9
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
#10
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
#11
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
#12
Error de compilación
                      main.c:1:3: error: invalid preprocessing directive
# está ordenado?
  ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:2:5: error: expected expression
N = int(input())
    ^
main.c:11:16: error: expected ';' after top level declarator
print(ordenado)
               ^
               ;
1 warning and 3 errors generated.

                    
Puntos totales: 0 / 100

Código

# está ordenado?
N = int(input())
arreglo = [int(x) for x in input().split()]

ordenado = True
actual = arreglo[0]
for i in range(len(arreglo)):
    if arreglo[i]<actual:
        ordenado = False
        break
print(ordenado)