Rezultati

Up. imeNalogaJezikRezultatČas oddaje
vlakectomaz-2017 Škatle Python 3 100/100OK 20. apr '17 @ 19:42

Test Točke Porabljen spomin Porabljen čas Status
#1 6/6 8,621 MiB 0,000 s OK
#2 6/6 8,621 MiB 0,000 s OK
#3 6/6 8,633 MiB 0,000 s OK
#4 6/6 8,621 MiB 0,000 s OK
#5 6/6 8,598 MiB 0,000 s OK
#6 7/7 8,617 MiB 0,000 s OK
#7 7/7 8,605 MiB 0,000 s OK
#8 7/7 8,633 MiB 0,000 s OK
#9 7/7 8,613 MiB 0,000 s OK
#10 7/7 8,594 MiB 0,000 s OK
#11 7/7 8,594 MiB 0,000 s OK
#12 7/7 8,672 MiB 0,000 s OK
#13 7/7 8,660 MiB 0,000 s OK
#14 7/7 8,660 MiB 0,000 s OK
#15 7/7 8,617 MiB 0,000 s OK

Ocenjevani program (skatle.py):
def lohPoje(skatla, skatlo):
    a=sum(1 if s1<=s2 else 0 for s1,s2 in zip(skatla,skatlo))
    return a==0

N,D=[int(x) for x in input().split(" ")]

skatle=[]
poje=[1 for x in range(N)]
for i in range(N):
    skatle.append(sorted([int(x) for x in input().split(" ")], reverse=True))

skatle.sort()

for i in range(1,N):
    for j in range(i):
        if(lohPoje(skatle[i],skatle[j])):
            poje[i] = max(poje[i], 1+poje[j])

print(max(poje))