Rezultati

Up. imeNalogaJezikRezultatČas oddaje
fmffml-2018 Droni Python 3 100/100OK 10. maj '18 @ 17:37

Test Točke Porabljen spomin Porabljen čas Status
#1 5/5 8,648 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#2 5/5 8,605 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#3 5/5 8,625 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#4 5/5 8,621 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#5 5/5 8,535 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#6 5/5 8,617 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#7 5/5 8,488 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#8 5/5 8,500 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#9 5/5 8,496 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#10 5/5 8,625 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#11 5/5 8,582 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#12 5/5 8,492 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#13 5/5 8,664 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#14 5/5 8,652 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#15 5/5 8,582 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#16 5/5 8,488 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#17 5/5 8,559 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#18 5/5 8,488 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#19 5/5 8,563 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#20 5/5 8,480 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.

Ocenjevani program (gotofsidron.py):
def tiskaj(zac1, zac2):
    print('('+str(zac1[0])+' '+str(zac1[1])+' '+str(zac1[2])+') ('+str(zac2[0])+' '+str(zac2[1])+' '+str(zac2[2])+')')


def dron(zac1, zac2, kon1, kon2):
    tiskaj(zac1, zac2)
    for i in range(3):
        if kon1[i] != kon2[i]:
            p = i
            break
    r = False
    for i in range(3):
        if i != p and zac1[i] != zac2[i]:
            r = i
            break

    if not r:
        r = (p + 1) % 3
        zac1[r] += 1
        tiskaj(zac1, zac2)

    while zac1[p] != kon1[p] or zac2[p] != kon2[p]:
        if zac1[p] != kon1[p]:
            if kon1[p] > zac1[p]:
                zac1[p] += 1
            else: zac1[p] -= 1

        if zac2[p] != kon2[p]:
            if kon2[p] > zac2[p]:
                zac2[p] += 1
            else:
                zac2[p] -= 1

        tiskaj(zac1, zac2)

    t = [i for i in set([0, 1, 2]) - {p}]

    while zac1[t[0]] != kon1[t[0]] or zac1[t[1]] != kon1[t[1]] or zac2[t[0]] != kon2[t[0]] or zac2[t[1]] != kon2[t[1]]:

        if zac1[t[0]] != kon1[t[0]]:
            if kon1[t[0]] > zac1[t[0]]:
                zac1[t[0]] += 1
            else:
                zac1[t[0]] -= 1
        elif zac1[t[1]] != kon1[t[1]]:
            if kon1[t[1]] > zac1[t[1]]:
                zac1[t[1]] += 1
            else:
                zac1[t[1]] -= 1

        if zac2[t[0]] != kon2[t[0]]:
            if kon2[t[0]] > zac2[t[0]]:
                zac2[t[0]] += 1
            else:
                zac2[t[0]] -= 1
        elif zac2[t[1]] != kon2[t[1]]:
            if kon2[t[1]] > zac2[t[1]]:
                zac2[t[1]] += 1
            else:
                zac2[t[1]] -= 1

        tiskaj(zac1, zac2)


#dron([0,0,0],[1,1,2],[2,2,2],[0,0,0])
# dron([-2,0,0],[3,0,0],[1,0,0],[-1,0,0])
# dron([0,0,0],[1,1,2],[2,2,2],[0,0,0])
prvi = input()
zac1 = [int(prvi.split()[i]) for i in range(3)]
kon1 = [int(prvi.split()[i]) for i in range(3, 6)]

drugi = input()
zac2 = [int(drugi.split()[i]) for i in range(3)]
kon2 = [int(drugi.split()[i]) for i in range(3, 6)]

dron(zac1, zac2, kon1, kon2)