Rezultati

Up. imeNalogaJezikRezultatČas oddaje
JayZCrew Škatle Python 3 100/100OK 20. apr '17 @ 17:56

Test Točke Porabljen spomin Porabljen čas Status
#1 6/6 8,535 MiB 0,000 s OK
#2 6/6 8,621 MiB 0,000 s OK
#3 6/6 8,516 MiB 0,000 s OK
#4 6/6 8,602 MiB 0,000 s OK
#5 6/6 8,555 MiB 0,000 s OK
#6 7/7 8,602 MiB 0,000 s OK
#7 7/7 8,539 MiB 0,000 s OK
#8 7/7 8,621 MiB 0,000 s OK
#9 7/7 8,590 MiB 0,000 s OK
#10 7/7 8,590 MiB 0,000 s OK
#11 7/7 8,590 MiB 0,000 s OK
#12 7/7 8,629 MiB 0,000 s OK
#13 7/7 8,641 MiB 0,000 s OK
#14 7/7 8,637 MiB 0,000 s OK
#15 7/7 8,617 MiB 0,000 s OK

Ocenjevani program (skatle.py):
import sys

def pase(S1,S2):
    for i in range(len(S1)):
        if S1[i] >= S2[i]:
            return False
    return True




N, d = sys.stdin.readline().split()
N, d = int(N),int(d)
Skatle = list()
for i in range(N):
    skatla = list(map(int,sys.stdin.readline().strip().split()))
    Skatle.append(sorted(skatla))

Skatle.sort()

tabela = [0 for _ in range(N)]
tabela[0] = 1

for i in range(1, N):
    maks = 1
    for k in range(i):
        if pase(Skatle[k], Skatle[i]):
            maks = max(maks, 1 + tabela[k])
    tabela[i] = maks

print(max(tabela))