Rezultati

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

Test Točke Porabljen spomin Porabljen čas Status
#1 6/6 8,594 MiB 0,000 s OK
#2 6/6 8,543 MiB 0,000 s OK
#3 6/6 8,605 MiB 0,000 s OK
#4 6/6 8,543 MiB 0,000 s OK
#5 6/6 8,551 MiB 0,000 s OK
#6 7/7 8,539 MiB 0,000 s OK
#7 7/7 8,535 MiB 0,000 s OK
#8 7/7 8,547 MiB 0,000 s OK
#9 7/7 8,621 MiB 0,000 s OK
#10 7/7 8,539 MiB 0,000 s OK
#11 7/7 8,516 MiB 0,000 s OK
#12 7/7 8,555 MiB 0,000 s OK
#13 7/7 8,586 MiB 0,000 s OK
#14 7/7 8,539 MiB 0,000 s OK
#15 7/7 8,578 MiB 0,000 s OK

Ocenjevani program (naloga4.py):
a = input().split(" ")
n, dim = int(a[0]), int(a[1])

skl = []
dolzine = [0 for i in range(n)]
for i in range(n):
    m = input()
    skatla = tuple(sorted([int(x) for x in m.split(" ") if x != ""]))
    skl.append(skatla)

skl.sort()

def primerjaj_po_komp(x, y):
    for i, j in zip(x, y):
        if i >= j:
            return False
    return True


for i, skatla in enumerate(skl):
    for k in range(i+1, n):
        if primerjaj_po_komp(skatla, skl[k]):
            dolzine[k] = max(dolzine[k], dolzine[i] + 1)

print(max(dolzine) + 1)