Rezultati

Up. imeNalogaJezikRezultatČas oddaje
zerodays-2019 Moderna umetnost Python 3 100/100OK 09. maj '19 @ 17:11

Test Točke Porabljen spomin Porabljen čas Status
#1 [več] 20/20 8,539 MiB 0,000 s OK
#2 [več] 20/20 8,758 MiB 0,111 s OK
#3 [več] 20/20 8,582 MiB 0,162 s OK
#4 [več] 20/20 8,582 MiB 0,000 s OK
#5 [več] 20/20 8,727 MiB 0,111 s OK

Ocenjevani program (umetnost.py):
opacity = ' .:-=+*$#%@'

w, h, n = map(int, input().split())

platno = [[0 for i in range(w)] for j in range(h)]
m = 0
def mami(x):
    return opacity[min(10, x)]

for i in range(n):
    a, b, c, d = map(lambda x: int(x) - 1, input().split())

    tl = (min(a, c), min(b, d))
    br = (max(a, c), max(b, d))

    barvu = False
    for y in range(h):
        for x in range(w):
            #print(y >= tl[1] and y < br[1])
            if y >= tl[1] and y <= br[1] and x >= tl[0] and x <= br[0]:
                platno[y][x] += 1
                barvu = True
    
    if barvu: 
        m += 1

print('+' + '-'*w + '+')
for row in platno:
    print('|' + ''.join(map(mami, row)) + '|')
print('+' + '-'*w + '+')
print('{} pravokotnikov na belem'.format(m))