Rezultati

Up. imeNalogaJezikRezultatČas oddaje
Muf Droni Python 3 0/100Napaka med izvajanjem / ob izhodu (RTE) 10. maj '18 @ 20:00

Test Točke Porabljen spomin Porabljen čas Status
#1 0/5 8,383 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#2 0/5 8,309 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#3 0/5 8,414 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#4 0/5 8,438 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#5 0/5 8,316 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#6 0/5 8,336 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#7 0/5 8,391 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#8 0/5 8,320 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#9 0/5 8,434 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#10 0/5 8,414 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#11 0/5 8,422 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#12 0/5 8,348 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#13 0/5 8,414 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#14 0/5 8,383 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#15 0/5 8,352 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#16 0/5 8,391 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#17 0/5 8,348 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#18 0/5 8,344 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#19 0/5 8,410 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.
#20 0/5 8,422 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 3, in <module>
    xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
NameError: name 'raw_input' is not defined
Povratna informacija sodniškega sistema:
​The program made an invalid move.

Ocenjevani program (droni.py):
import math

xas, yas, zas, xae, yae, zae = map(int, raw_input().split())
xbs, ybs, zbs, xbe, ybe, zbe = map(int, raw_input().split()) 

dax = xae-xas
day = yae-yas
daz = zae-zas

dbx = xbe-xbs
dby = ybe-ybs
dbz = zbe-zbs

def sgn(a):
    return 1 if a>0 else -1


while (dax != 0 or day != 0 or daz != 0 or dbx != 0 or dby != 0 or dbz != 0):
    dax = xae-xas
    day = yae-yas
    daz = zae-zas

    dbx = xbe-xbs
    dby = ybe-ybs
    dbz = zbe-zbs
    moment = 0
    prevloca = (dax, day, daz)
    if(abs(dbx)>0):
        moment = 1
    elif (abs(dby)>0):
        moment = 2
    elif (abs(dbz)>0):
        moment = 3
    
    while (True):
        big_delta = max(abs(dax), abs(daz), abs(day))
        if big_delta == 0:
            break
        else:
            if dax == big_delta:
                if (xas+1, yas, zas) != (xbs, ybs, zbs):
                    xas += 1
                    break
            elif -dax == big_delta:
                if (xas-1, yas, zas) != (xbs, ybs, zbs):
                    xas -= 1
                    break
            else:
                big_delta = max(abs(daz), abs(day))
                if daz == big_delta:
                    if (xas, yas, zas+1) != (xbs, ybs, zbs):
                        zas += 1
                        break
                elif -daz == big_delta:
                    if (xas, yas, zas-1) != (xbs, ybs, zbs):
                        zas -= 1
                        break
                elif day > 0:
                    if (xas, yas+1, zas) != (xbs, ybs, zbs):
                        yas += 1
                        break
        break
        #finished moving boat a
    if moment == 1:
        if (xbs+sgn(dbx), ybs, zbs) != (xas, yas, zas) and (xbs+sgn(dbx), ybs, zbs) != (xas, yas, zas):
            xbs += sgn(dbx)
        else:
            zbs += 1
    elif moment == 2:
        if (xbs, ybs+sgn(dby), zbs) != (xas, yas, zas) and (xbs, ybs+sgn(dby), zbs) != (xas, yas, zas):
            ybs += sgn(dby)
        else:
            zbs += 1
    elif moment == 3:
        if (xbs, ybs, zbs+sgn(dbz)) != (xas, yas, zas) and (xbs, ybs, zbs+sgn(dbz)) != (xas, yas, zas):
            zbs += sgn(dbz)
        else:
            ybs += 1
    
    print("("+str(xas)+" "+str(yas)+" "+str(zas)+ ") ("+ str(xbs)+" "+ str(ybs)+ " "+ str(zbs)+ ")")