Rezultati

Up. imeNalogaJezikRezultatČas oddaje
OgresOfWekmar2017 Trgovec Python 0/100Napaka med izvajanjem / ob izhodu (RTE) 11. maj '17 @ 19:34

Test Točke Porabljen spomin Porabljen čas Status
#1 0/3 6,520 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    2 4 1
      ^
SyntaxError: invalid syntax
#2 0/3 6,484 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    3 6 1
      ^
SyntaxError: invalid syntax
#3 0/3 6,480 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    6 12 1
       ^
SyntaxError: invalid syntax
#4 0/3 6,484 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    4 8 1
      ^
SyntaxError: invalid syntax
#5 0/3 6,484 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    5 10 1
       ^
SyntaxError: invalid syntax
#6 0/3 6,484 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    5 10 1
       ^
SyntaxError: invalid syntax
#7 0/3 6,512 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    5 10 1
       ^
SyntaxError: invalid syntax
#8 0/3 6,520 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    4 8 1
      ^
SyntaxError: invalid syntax
#9 0/3 6,488 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    5 10 1
       ^
SyntaxError: invalid syntax
#10 0/3 6,484 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    6 12 1
       ^
SyntaxError: invalid syntax
#11 0/3 6,520 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    49 98 1
        ^
SyntaxError: invalid syntax
#12 0/3 6,516 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    44 88 1
        ^
SyntaxError: invalid syntax
#13 0/3 6,477 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    43 86 1
        ^
SyntaxError: invalid syntax
#14 0/3 6,480 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    41 82 1
        ^
SyntaxError: invalid syntax
#15 0/3 6,484 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    50 100 1
         ^
SyntaxError: invalid syntax
#16 0/3 6,520 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    300 305 206
          ^
SyntaxError: invalid syntax
#17 0/3 6,523 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    300 310 231
          ^
SyntaxError: invalid syntax
#18 0/3 6,484 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    300 350 16
          ^
SyntaxError: invalid syntax
#19 0/3 6,484 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    300 400 75
          ^
SyntaxError: invalid syntax
#20 0/3 6,484 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    300 10000 62
            ^
SyntaxError: invalid syntax
#21 0/4 6,520 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    100000 100000 97380
                ^
SyntaxError: invalid syntax
#22 0/4 6,480 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    99990 100000 97360
               ^
SyntaxError: invalid syntax
#23 0/4 6,516 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    99900 100000 97180
               ^
SyntaxError: invalid syntax
#24 0/4 6,520 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    50000 100000 39166
               ^
SyntaxError: invalid syntax
#25 0/4 6,520 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    33333 100000 31814
               ^
SyntaxError: invalid syntax
#26 0/4 6,484 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    100000 100000 97378
                ^
SyntaxError: invalid syntax
#27 0/4 6,520 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    99900 100000 97178
               ^
SyntaxError: invalid syntax
#28 0/4 6,520 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    50000 100000 39164
               ^
SyntaxError: invalid syntax
#29 0/4 6,484 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    33333 100000 5796
               ^
SyntaxError: invalid syntax
#30 0/4 6,520 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py", line 1, in <module>
    vozlisc, povezav,start=map(int,input().split())
  File "<string>", line 1
    16666 100000 2616
               ^
SyntaxError: invalid syntax

Ocenjevani program (TRGOVEC.py):
vozlisc, povezav,start=map(int,input().split())
start-=1
graf=[[] for i in range(vozlisc)]
grafReverse=[[] for i in range(vozlisc)]
for i in range(povezav):
    a,b=map(int,input().split())
    a-=1
    b-=1
    graf[a].append(b)
    grafReverse[b].append(a)

def scc(graf, grafReverse):
    preostala=set(range(len(graf)))
    comps=[]
    while preostala:
        prvo=preostala.__iter__().__next__()
        todo=[prvo]
        outcomp=set()
        outcomp.add(prvo)
        preostala.remove(prvo)
        while todo:
            cur=todo.pop()
            for i in graf[cur]:
                if i not in outcomp:
                    todo.append(i)
                    outcomp.add(i)
        todo=[prvo]
        incomp=set()
        incomp.add(prvo)
        while todo:
            cur=todo.pop()
            for i in grafReverse[cur]:
                if i not in incomp and i in outcomp:
                    todo.append(i)
                    incomp.add(i)
                    preostala.remove(i)
        comps.append(incomp)
    return comps

cc=scc(graf,grafReverse)

ccmap={}
for n,i in enumerate(cc):
    for vert in i:
        ccmap[vert]=n


g2=[[] for i in cc]
g2rev=[[] for i in cc]
for n,i in enumerate(cc):
    for vert in i:
        for neigh in graf[vert]:
            if neigh not in i:
                neigh_cc = ccmap[neigh]
                g2[n].append(neigh_cc)
                g2rev[neigh_cc].append(n)

n_out_0=0
for i in g2:
    if len(i)==0:
        n_out_0+=1
n_in_0=0
ok_start=None
for n,i in enumerate(g2rev):
    if len(i)==0:
        n_in_0+=1
        ok_start=n

if n_out_0==1 and n_in_0==1 and start in cc[ok_start]:
    print("DA")
else:
    print("NE")