Rezultati

Up. imeNalogaJezikRezultatČas oddaje
Muf Nič nas ne sme presenetiti! Python 3 0/100Prekoračen čas (TLE) 19. apr '18 @ 19:07

Test Točke Porabljen spomin Porabljen čas Status
#1 12/12 8,563 MiB 0,000 s OK
#2 0/12 8,313 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 1, in <module>
    mesta, sit = input().split(" ")
ValueError: too many values to unpack (expected 2)
#3 12/12 8,570 MiB 0,000 s OK
#4 0/12 36,988 MiB 3,202 s Prekoračen čas
#5 13/13 8,496 MiB 0,000 s OK
#6 13/13 26,297 MiB 0,720 s OK
#7 13/13 26,461 MiB 1,513 s OK
#8 0/13 27,051 MiB 3,241 s Prekoračen čas

Ocenjevani program (upor.py):
mesta, sit = input().split(" ")
mesta = int(mesta)
sit = int(sit)
mapy = [[] for _ in range(mesta+1)]

def checku(a, b):
    if a in b:
        return True
    return False


for i in range (mesta-1):
    x, y = input().split(" ")
    x = int(x)
    y = int(y)
    mapy[x].append(y)
    mapy[y].append(x)

for _ in range(sit):
    queue = []
    vhod = [int(x) for x in input().split(" ")]

    meme = vhod[0]
    vhod.pop(0)
    cnt = 0
    queue.append(vhod[0])
    been = []
    while (cnt != meme and len(queue) != 0):
        cnt += 1
        been.append(queue[0])
        for x in mapy[queue[0]]:
            if checku(x, vhod) and x not in been:
                queue.append(x)
        queue.pop(0)
    if (cnt == meme):
        print("ALAAAARHM")
    else:
        print("NASLEDNJI")