Rezultati

Up. imeNalogaJezikRezultatČas oddaje
muzik-2018 Droni Python 3 100/100OK 10. maj '18 @ 19:11

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,555 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#3 5/5 8,695 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#4 5/5 8,520 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#5 5/5 8,707 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#6 5/5 8,691 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#7 5/5 8,496 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#8 5/5 8,578 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#9 5/5 8,484 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#10 5/5 8,527 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#11 5/5 8,652 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#12 5/5 8,551 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,656 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#15 5/5 8,578 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#16 5/5 8,563 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#17 5/5 8,551 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#18 5/5 8,648 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#19 5/5 8,586 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#20 5/5 8,500 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.

Ocenjevani program (droni2.pz.py):
import sys

#sys.stdin = open("mesta.in")

inp = sys.stdin.readline

sdr1 = list(map(int, inp().split()))
sdr2 = list(map(int, inp().split()))

edr1 = sdr1[3:]
edr2 = sdr2[3:]

dr1 = sdr1[:3]
dr2 = sdr2[:3]

def cp(l1, l2):
    return l1[0] == l2[0] and l1[1] == l2[1] and l1[2] == l2[2]

j = 0
print(repr(dr1).replace('[', '(').replace(']', ')').replace(',', '') + " " + repr(dr2).replace('[', '(').replace(']', ')').replace(',', ''))


lastp1 = list(dr1)
lastp2 = list(dr2)

def prnt():
    global lastp1, lastp2, dr1, dr2
    if not (cp(lastp1, dr1) and cp(lastp2, dr2)):
        print(repr(dr1).replace('[', '(').replace(']', ')').replace(',', '') + " " + repr(dr2).replace('[', '(').replace(']',')').replace(',', ''))
        lastp1 = list(dr1)
        lastp2 = list(dr2)

df1 = [0,0,0]
df2 = [0,0,0]

if dr1[2] == dr2[2]:
    dr2[2] += 1
    prnt()

dstx1 = edr1[0] - dr1[0]
dstx2 = edr2[0] - dr2[0]

dsty1 = edr1[1] - dr1[1]
dsty2 = edr2[1] - dr2[1]


dstz1 = edr1[2] - dr1[2]
dstz2 = edr2[2] - dr2[2]

chx = False
try:
    while 1:

        for i in range(2):
            if dr1[i] != edr1[i]:
                df1[i] = (edr1[i] - dr1[i]) // abs(edr1[i] - dr1[i])
                dr1[i] += df1[i]
            else:
                df1[i] = 0

            if dr2[i] != edr2[i]:
                df2[i] = (edr2[i] - dr2[i]) // abs(edr2[i] - dr2[i])
                dr2[i] += df2[i]
            else:
                df2[i] = 0
            prnt()
            if dr1[0] == edr1[0] and dr2[0] == edr2[0] and dr1[1] == edr1[1] and dr2[1] == edr2[1]:
                1/0
except ZeroDivisionError:
    pass
if dr1[0] == dr2[0]:
    dr1[0] += 1
    chx = 1
    prnt()



try:
    while 1:
        for i in range(2,3):
            if dr1[i] != edr1[i]:
                df1[i] = (edr1[i] - dr1[i]) // abs(edr1[i] - dr1[i])
                dr1[i] += df1[i]
            else:
                df1[i] = 0

            if dr2[i] != edr2[i]:
                df2[i] = (edr2[i] - dr2[i]) // abs(edr2[i] - dr2[i])
                dr2[i] += df2[i]
            else:
                df2[i] = 0
            prnt()
            if dr1[2] == edr1[2] and dr2[2] == edr2[2]:
                1/0
except ZeroDivisionError:
    pass

if chx:
    dr1[0] -= 1
    prnt()