Rezultati

Up. imeNalogaJezikRezultatČas oddaje
cimetovipolzki-2018 Birokrati Python 3 0/100Napaka med izvajanjem / ob izhodu (RTE) 04. okt '18 @ 20:00

Test Točke Porabljen spomin Porabljen čas Status
#1 0/9 8,418 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 10, in <module>
    inp = input()
EOFError: EOF when reading a line
#2 0/9 8,422 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 10, in <module>
    inp = input()
EOFError: EOF when reading a line
#3 0/9 8,340 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 10, in <module>
    inp = input()
EOFError: EOF when reading a line
#4 0/9 8,418 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 10, in <module>
    inp = input()
EOFError: EOF when reading a line
#5 0/9 8,336 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 10, in <module>
    inp = input()
EOFError: EOF when reading a line
#6 0/9 8,355 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 10, in <module>
    inp = input()
EOFError: EOF when reading a line
#7 0/9 8,656 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 10, in <module>
    inp = input()
EOFError: EOF when reading a line
#8 0/9 8,352 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 10, in <module>
    inp = input()
EOFError: EOF when reading a line
#9 0/9 8,430 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 10, in <module>
    inp = input()
EOFError: EOF when reading a line
#10 0/9 8,359 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 10, in <module>
    inp = input()
EOFError: EOF when reading a line
#11 0/10 8,434 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 10, in <module>
    inp = input()
EOFError: EOF when reading a line

Ocenjevani program (birokrati.py):
first = []
mob = []
mnz = []
a = []
borut = []
xxx = []
unm = []

for _ in range(1001):
    inp = input()
    if inp == "":
        break
    ime, obt = inp.split(" ")
    odd = ime.split("/")[1:]
    ref = obt
    dol = len(odd)
    if dol == 1:
        first.append((ime, ref))
    elif dol == 2:
        if odd[0] == "mob":
            mob.append((ime, ref))
        elif odd[0] == "mnz":
            mnz.append((ime, ref))
    elif dol == 3:
        if odd[1] == "a":
            a.append((ime, ref))
        elif odd[1] == "borut":
            borut.append((ime, ref))
    elif dol == 4:
        if odd[2] == "xxx":
            xxx.append((ime, ref))
    elif dol == 5:
        if odd[3] == "umn":
            unm.append((ime, ref))

first.sort(key = lambda x: x[0])
mob.sort(key = lambda x: x[0])
mnz.sort(key = lambda x: x[0])
a.sort(key = lambda x: x[0])
borut.sort(key = lambda x: x[0])
xxx.sort(key = lambda x: x[0])
unm.sort(key = lambda x: x[0])


current = None
if len(first) != 0:
    current = first[0]
elif len(mob) != 0:
    current = mnz[0]
elif len(a) != 0:
    current = a[0]
elif len(xxx) != 0:
    current = xxx[0]
elif len(unm) != 0:
    current = unm[0]


visited = set()
while current[1] not in visited:
    visited.add(current[1])
    ref = list(map(int, current[1].split(".")))
    dol = len(ref)
    group = None
    if dol == 1:
        group = first
    elif dol == 2:
        if ref[0] == 1:
            group = mnz
        if ref[0] == 2:
            group = mob
    elif dol == 3:
        if ref[0] == 1 and ref[1] == 1:
            group = a
        if ref[0] == 1 and ref[1] == 2:
            group = borut
    elif dol == 4:
        if ref[0] == 1 and ref[1] == 1 and ref[2] == 1:
            group = xxx
    elif dol == 5:
        if ref[0] == 1 and ref[1] == 1 and ref[2] == 1 and ref[3] == 1:
            group = borut

    if group == None:
        print(current[0])
        exit()
    if len(group) < ref[-1]:
        print(current[0])
        exit()
    else:
        current = group[ref[-1]-1]

print(current[0])