Rezultati

Up. imeNalogaJezikRezultatČas oddaje
anabertacilka-2019 Moderna umetnost Python 3 0/100Napaka med izvajanjem / ob izhodu (RTE) 09. maj '19 @ 17:54

Test Točke Porabljen spomin Porabljen čas Status
#1 [več] 0/20 8,672 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 31, in <module>
    l += m[c]
IndexError: string index out of range
#2 [več] 0/20 8,734 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 31, in <module>
    l += m[c]
IndexError: string index out of range
#3 [več] 0/20 8,637 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 31, in <module>
    l += m[c]
IndexError: string index out of range
#4 [več] 0/20 8,520 MiB 0,000 s Napačen odgovor
Tvoj izhod:
​+----------------------------------------------------------------------------------------------------+
|@+=======+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::--|
|+=--------........................................................................................::|
|=-::::::::                                                                                        ..|
|=-::::::::                                                                                        ..|
|=-::::::::                                                                                        ..|
Pravilen izhod:
​+----------------------------------------------------------------------------------------------------+
|$=--------........................................................................................::|
|==--------........................................................................................::|
|--::::::::                                                                                        ..|
|--::::::::                                                                                        ..|
|--::::::::                                                                                        ..|
#5 [več] 0/20 8,645 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 31, in <module>
    l += m[c]
IndexError: string index out of range

Ocenjevani program (umetnost.py):
w, h, n = list(map(int, input().split()))

platno = [[0] * w for _ in range(h)]

for i in range(n):
    a, b, c, d = list(map(int, input().split()))
    if (a < 0 and c < 0) or (b < 0 and d < 0) or (a > w and c > w) or (b > h and d > h):
        continue
    a = min(max(1, a), w)
    b = min(max(1, b), h)
    c = min(max(1, c), w)
    d = min(max(1, d), h)

    asdasd= ""
    # print(min(b, d), max(b, d))
    # print(min(a, c), max(a, c))

    for x in range(min(b, d)-1, max(b, d)):
        for y in range(min(a, c)-1, max(a, c)):
            if y == 0 and x == 9:
                asdasd = ""
            platno[x][y] += 1


hline = "+" + "-" * w + "+"
print(hline)
m = ' .:-=+*$#%@'
for line in platno:
    l = "|"
    for c in list(line):
        l += m[c]
    l += "|"
    print(l)

print(hline)




# +--------------------+
# |                    |
# |                    |
# | ........           |
# | ........           |
# | ........           |
# | ........           |
# |.::::....           |
# |:-=--::::...........|
# |.::::....           |
# |.....               |
# +--------------------+
"""
20 10 5
1 10 5 7
-5 8 30 8
3 8 3 8
-10 50 -20 40
2 9 9 3
"""