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

Envío 7188

Problema 0xde - Ordenar un arreglo grande

  • Autor: Jorgito
  • Fecha: 2023-11-06 16:42:33 UTC (Hace alrededor de 1 año)
Caso # Resultado Tiempo Memoria
#1
Incorrecto
0.011 s 3 KBi
#2
Incorrecto
0.008 s 3 KBi
#3
Incorrecto
0.013 s 3 KBi
#4
Incorrecto
0.012 s 3 KBi
#5
Incorrecto
0.012 s 3 KBi
#6
Incorrecto
0.012 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 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.008 s 3 KBi
#8
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.009 s 3 KBi
#9
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.014 s 3 KBi
#10
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.01 s 3 KBi
#11
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.008 s 3 KBi
#12
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.009 s 3 KBi
#13
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.008 s 3 KBi
#14
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.009 s 3 KBi
#15
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.008 s 3 KBi
#16
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.01 s 3 KBi
#17
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.009 s 3 KBi
#18
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.009 s 3 KBi
#19
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.008 s 3 KBi
#20
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.014 s 3 KBi
#21
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.01 s 3 KBi
#22
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.009 s 3 KBi
#23
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.012 s 3 KBi
#24
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.012 s 3 KBi
#25
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.009 s 3 KBi
#26
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.012 s 3 KBi
#27
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 12, in <module>
    bubblesort(lista)
  File "script.py", line 6, in bubblesort
    lista[j], lista[j+1] = lista[j+1], lista[j]
TypeError: 'str' object does not support item assignment
0.009 s 3 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__':
    lista = input()
    bubblesort(lista)