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

Envío 7191

Problema 0xde - Ordenar un arreglo grande

  • Autor: Jorgito
  • Fecha: 2023-11-06 16:50:51 UTC (Hace alrededor de 1 año)
Caso # Resultado Tiempo Memoria
#1
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.014 s 3 KBi
#2
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.008 s 3 KBi
#3
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.013 s 3 KBi
#4
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.008 s 3 KBi
#5
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.008 s 3 KBi
#6
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.013 s 3 KBi
#7
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.016 s 4 KBi
#8
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.017 s 6 KBi
#9
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.019 s 4 KBi
#10
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.02 s 8 KBi
#11
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.032 s 14 KBi
#12
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.036 s 14 KBi
#13
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.031 s 14 KBi
#14
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.025 s 14 KBi
#15
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.027 s 14 KBi
#16
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.031 s 14 KBi
#17
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.03 s 14 KBi
#18
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.034 s 15 KBi
#19
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.026 s 14 KBi
#20
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.02 s 4 KBi
#21
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.031 s 14 KBi
#22
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.026 s 14 KBi
#23
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.03 s 14 KBi
#24
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.027 s 15 KBi
#25
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.027 s 15 KBi
#26
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.022 s 14 KBi
#27
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 13, in <module>
    print(" ".join(map(str, bubblesort(lista))))
NameError: name 'lista' is not defined
0.031 s 14 KBi
Puntos totales: 0 / 100

Código

def bubblesort(lista):
    n = len(lista)
    for i in range(n-1):
        for j in range(0, n-i-1):
            if lista[j] > lista[j+1]:
                lista[j], lista[j+1] = lista[j+1], lista[j]

    return lista

if __name__ == '__main__':
    N = int(input())
    l = list(map(int, input().split(" ")))
    print(" ".join(map(str, bubblesort(lista))))