Rezultati

Up. imeNalogaJezikRezultatČas oddaje
narcos Jungle Speed Python 3 0/100Napaka med izvajanjem / ob izhodu (RTE) 11. maj '17 @ 19:14

Test Točke Porabljen spomin Porabljen čas Status
#1 0/9 8,660 MiB 0,000 s Napačen odgovor
Tvoj izhod:
​{0: [[2], 3, [1, 4, 2]], 1: [[], 4, [3, 3, 4, 3]], 2: [[], 4, [3, 1, 4, 4]], 3: [[], 4, [1, 2, 2, 1]]}
{0: [[2], 3, [1, 4, 2]], 1: [[3], 3, [3, 4, 3]], 2: [[], 4, [3, 1, 4, 4]], 3: [[], 4, [1, 2, 2, 1]]}
{0: [[2], 3, [1, 4, 2]], 1: [[3], 3, [3, 4, 3]], 2: [[3], 3, [1, 4, 4]], 3: [[], 4, [1, 2, 2, 1]]}
{0: [[2], 3, [1, 4, 2]], 1: [[], 3, [3, 4, 3]], 2: [[], 5, [1, 4, 4, 3, 3]], 3: [[1], 3, [2, 2, 1]]}
{0: [[2, 1], 2, [4, 2]], 1: [[], 3, [3, 4, 3]], 2: [[], 5, [1, 4, 4, 3, 3]], 3: [[1], 3, [2, 2, 1]]}
Pravilen izhod:
​1
<<<EOF>>>
#2 0/9 8,605 MiB 0,000 s Napačen odgovor
Tvoj izhod:
​{0: [[1], 3, [3, 1, 3]], 1: [[], 4, [3, 4, 1, 2]], 2: [[], 4, [4, 2, 3, 2]], 3: [[], 4, [1, 4, 4, 2]]}
{0: [[1], 3, [3, 1, 3]], 1: [[3], 3, [4, 1, 2]], 2: [[], 4, [4, 2, 3, 2]], 3: [[], 4, [1, 4, 4, 2]]}
{0: [[1], 3, [3, 1, 3]], 1: [[3], 3, [4, 1, 2]], 2: [[4], 3, [2, 3, 2]], 3: [[], 4, [1, 4, 4, 2]]}
{0: [[1], 3, [3, 1, 3]], 1: [[3], 3, [4, 1, 2]], 2: [[4], 3, [2, 3, 2]], 3: [[1], 3, [4, 4, 2]]}
{0: [[1, 3], 2, [1, 3]], 1: [[3], 3, [4, 1, 2]], 2: [[4], 3, [2, 3, 2]], 3: [[1], 3, [4, 4, 2]]}
Pravilen izhod:
​4
<<<EOF>>>
#3 0/9 8,605 MiB 0,000 s Napačen odgovor
Tvoj izhod:
​{0: [[3], 3, [4, 1, 3]], 1: [[], 4, [3, 3, 4, 4]], 2: [[], 4, [1, 1, 2, 1]], 3: [[], 4, [2, 4, 2, 2]]}
{0: [[3], 3, [4, 1, 3]], 1: [[3], 3, [3, 4, 4]], 2: [[], 4, [1, 1, 2, 1]], 3: [[], 4, [2, 4, 2, 2]]}
{0: [[], 3, [4, 1, 3]], 1: [[], 5, [3, 4, 4, 3, 3]], 2: [[1], 3, [1, 2, 1]], 3: [[], 4, [2, 4, 2, 2]]}
{0: [[], 3, [4, 1, 3]], 1: [[], 5, [3, 4, 4, 3, 3]], 2: [[1], 3, [1, 2, 1]], 3: [[2], 3, [4, 2, 2]]}
{0: [[4], 2, [1, 3]], 1: [[], 5, [3, 4, 4, 3, 3]], 2: [[1], 3, [1, 2, 1]], 3: [[2], 3, [4, 2, 2]]}
Pravilen izhod:
​2
<<<EOF>>>
#4 0/9 8,590 MiB 0,000 s Napačen odgovor
Tvoj izhod:
​{0: [[1], 3, [3, 4, 1]], 1: [[], 4, [1, 2, 4, 3]], 2: [[], 4, [2, 3, 3, 4]], 3: [[], 4, [2, 1, 2, 4]]}
{0: [[1], 3, [3, 4, 1]], 1: [[1], 3, [2, 4, 3]], 2: [[], 4, [2, 3, 3, 4]], 3: [[], 4, [2, 1, 2, 4]]}
{0: [[], 3, [3, 4, 1]], 1: [[], 5, [2, 4, 3, 1, 1]], 2: [[2], 3, [3, 3, 4]], 3: [[], 4, [2, 1, 2, 4]]}
{0: [[], 3, [3, 4, 1]], 1: [[], 5, [2, 4, 3, 1, 1]], 2: [[2], 3, [3, 3, 4]], 3: [[2], 3, [1, 2, 4]]}
{0: [[3], 2, [4, 1]], 1: [[], 5, [2, 4, 3, 1, 1]], 2: [[], 3, [3, 3, 4]], 3: [[], 5, [1, 2, 4, 2, 2]]}
Pravilen izhod:
​4
<<<EOF>>>
#5 0/9 8,621 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 28, in <module>
    loja[i%n][0].append(loja[i%n][2][0])
IndexError: list index out of range
#6 0/9 8,609 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 28, in <module>
    loja[i%n][0].append(loja[i%n][2][0])
IndexError: list index out of range
#7 0/9 8,551 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 28, in <module>
    loja[i%n][0].append(loja[i%n][2][0])
IndexError: list index out of range
#8 0/9 8,594 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 28, in <module>
    loja[i%n][0].append(loja[i%n][2][0])
IndexError: list index out of range
#9 0/9 8,613 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 28, in <module>
    loja[i%n][0].append(loja[i%n][2][0])
IndexError: list index out of range
#10 0/9 8,629 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 28, in <module>
    loja[i%n][0].append(loja[i%n][2][0])
IndexError: list index out of range
#11 0/10 8,605 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 19, in <module>
    loja[i%n][2].append(d1[i])
KeyError: 2

Ocenjevani program (tiest2.py):
import sys
f= sys.stdin
#f = open('test.txt','r')
lines = f.read().strip().split('\n')
l1 = lines[0]
n = int(l1.split(" ")[0])
l2=lines[1]
l2 = l2.split(" ")
d1 = []
for i in l2:
    d1.append(int(i))

m = len(d1)//4
loja = dict()
for i in range(m):
    loja[i]=[[],m,[]]

for i in range(len(d1)):
    loja[i%n][2].append(d1[i])

for i in loja:
    loja[i%n][2].reverse()

for i in range(1000):
    if loja[i%n][1] == 0:
        print((i%n)+1)
        break
    loja[i%n][0].append(loja[i%n][2][0])
    loja[i%n][1] =(loja[i%n][1]) - 1
    del loja[i%n][2][0]
    
    print(loja) 
    if len(loja[(i-1)%n][0])==0:
        continue
    if loja[i%n][0][-1] == loja[(i-1)%n][0][-1]:
        une = loja[i%n][0]
        ti = loja[(i-1)%n][0]
        loja[(i)%n][2]= loja[(i)%n][2]+ti+une
        loja[(i)%n][1] += (len(une)+len(ti))
        loja[(i-1)%n][0]= []
        loja[(i)%n][0]= []
        
      

   
f.close()