| Task: | Modern art |
| Sender: | aalto26jm_020 |
| Submission time: | 2026-11-09 17:32:15 +0200 |
| Language: | Python3 (PyPy3) |
| Status: | READY |
| Result: | RUNTIME ERROR |
| test | verdict | time | |
|---|---|---|---|
| #1 | RUNTIME ERROR | 0.07 s | details |
| #2 | RUNTIME ERROR | 0.07 s | details |
| #3 | RUNTIME ERROR | 0.07 s | details |
| #4 | ACCEPTED | 0.04 s | details |
| #5 | RUNTIME ERROR | 0.07 s | details |
| #6 | RUNTIME ERROR | 0.07 s | details |
| #7 | RUNTIME ERROR | 0.07 s | details |
| #8 | RUNTIME ERROR | 0.07 s | details |
| #9 | WRONG ANSWER | 0.04 s | details |
| #10 | RUNTIME ERROR | 0.07 s | details |
| #11 | ACCEPTED | 0.04 s | details |
| #12 | RUNTIME ERROR | 0.07 s | details |
| #13 | RUNTIME ERROR | 0.07 s | details |
| #14 | WRONG ANSWER | 0.04 s | details |
| #15 | ACCEPTED | 0.04 s | details |
| #16 | RUNTIME ERROR | 0.07 s | details |
| #17 | ACCEPTED | 0.04 s | details |
| #18 | RUNTIME ERROR | 0.07 s | details |
| #19 | WRONG ANSWER | 0.04 s | details |
| #20 | RUNTIME ERROR | 0.07 s | details |
| #21 | ACCEPTED | 0.04 s | details |
| #22 | RUNTIME ERROR | 0.07 s | details |
| #23 | RUNTIME ERROR | 0.07 s | details |
| #24 | RUNTIME ERROR | 0.07 s | details |
| #25 | ACCEPTED | 0.04 s | details |
| #26 | RUNTIME ERROR | 0.07 s | details |
| #27 | RUNTIME ERROR | 0.07 s | details |
| #28 | RUNTIME ERROR | 0.07 s | details |
| #29 | RUNTIME ERROR | 0.07 s | details |
| #30 | RUNTIME ERROR | 0.07 s | details |
| #31 | RUNTIME ERROR | 0.07 s | details |
| #32 | RUNTIME ERROR | 0.07 s | details |
| #33 | RUNTIME ERROR | 0.07 s | details |
| #34 | RUNTIME ERROR | 0.07 s | details |
| #35 | ACCEPTED | 0.04 s | details |
| #36 | RUNTIME ERROR | 0.07 s | details |
| #37 | ACCEPTED | 0.04 s | details |
| #38 | RUNTIME ERROR | 0.07 s | details |
| #39 | RUNTIME ERROR | 0.07 s | details |
| #40 | RUNTIME ERROR | 0.07 s | details |
| #41 | ACCEPTED | 0.04 s | details |
| #42 | RUNTIME ERROR | 0.08 s | details |
| #43 | RUNTIME ERROR | 0.07 s | details |
| #44 | RUNTIME ERROR | 0.07 s | details |
| #45 | ACCEPTED | 0.04 s | details |
| #46 | RUNTIME ERROR | 0.07 s | details |
| #47 | ACCEPTED | 0.04 s | details |
| #48 | RUNTIME ERROR | 0.07 s | details |
| #49 | RUNTIME ERROR | 0.07 s | details |
| #50 | RUNTIME ERROR | 0.07 s | details |
Code
A, P = map(int, input().split())
answer = None
if P % 2 == 0:
s = P // 2
best_key = None
for W in range(1, s):
h = s - W
key = (abs(W - h), -W)
if best_key is None or key < best_key:
best_key = key
answer = (W, h)
if answer is None:
print("IMPOSSIBLE")
else:
W, h = answer
grid = [[0] * W for _ in range(h)]
for r in range(1, h):
for c in range(W - 2, -1, -1):
if left > 0:
grid[r][c] = 1
left -= 1
print("POSSIBLE")
print("0" * (W + 2))
for row in grid:
print("0" + "".join(map(str, row)) + "0")
print("0" * (W + 2))
Test details
Test 1
Verdict: RUNTIME ERROR
| input |
|---|
| 5 14 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 2
Verdict: RUNTIME ERROR
| input |
|---|
| 6 14 |
| correct output |
|---|
| POSSIBLE 000 010 010 010 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 3
Verdict: RUNTIME ERROR
| input |
|---|
| 7 10 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 4
Verdict: ACCEPTED
| input |
|---|
| 5 5 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| IMPOSSIBLE |
Test 5
Verdict: RUNTIME ERROR
| input |
|---|
| 6 22 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 6
Verdict: RUNTIME ERROR
| input |
|---|
| 7 10 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 7
Verdict: RUNTIME ERROR
| input |
|---|
| 5 20 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 8
Verdict: RUNTIME ERROR
| input |
|---|
| 6 8 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 9
Verdict: WRONG ANSWER
| input |
|---|
| 7 4 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| POSSIBLE 000 000 000 |
Test 10
Verdict: RUNTIME ERROR
| input |
|---|
| 5 10 |
| correct output |
|---|
| POSSIBLE 0000 0110 0110 0100 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 11
Verdict: ACCEPTED
| input |
|---|
| 10 25 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| IMPOSSIBLE |
Test 12
Verdict: RUNTIME ERROR
| input |
|---|
| 10 22 |
| correct output |
|---|
| POSSIBLE 000 010 010 010 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 13
Verdict: RUNTIME ERROR
| input |
|---|
| 10 14 |
| correct output |
|---|
| POSSIBLE 0000 0110 0110 0110 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 14
Verdict: WRONG ANSWER
| input |
|---|
| 10 6 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| POSSIBLE 0000 0000 0000 |
Test 15
Verdict: ACCEPTED
| input |
|---|
| 10 37 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| IMPOSSIBLE |
Test 16
Verdict: RUNTIME ERROR
| input |
|---|
| 10 12 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 17
Verdict: ACCEPTED
| input |
|---|
| 10 39 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| IMPOSSIBLE |
Test 18
Verdict: RUNTIME ERROR
| input |
|---|
| 10 14 |
| correct output |
|---|
| POSSIBLE 0000 0110 0110 0110 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 19
Verdict: WRONG ANSWER
| input |
|---|
| 10 4 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| POSSIBLE 000 000 000 |
Test 20
Verdict: RUNTIME ERROR
| input |
|---|
| 10 16 |
| correct output |
|---|
| POSSIBLE 00000000 01111110 01111000 00000000 |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 21
Verdict: ACCEPTED
| input |
|---|
| 100 239 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| IMPOSSIBLE |
Test 22
Verdict: RUNTIME ERROR
| input |
|---|
| 100 202 |
| correct output |
|---|
| POSSIBLE 000 010 010 010 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 23
Verdict: RUNTIME ERROR
| input |
|---|
| 100 70 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 24
Verdict: RUNTIME ERROR
| input |
|---|
| 100 32 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 25
Verdict: ACCEPTED
| input |
|---|
| 100 361 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| IMPOSSIBLE |
Test 26
Verdict: RUNTIME ERROR
| input |
|---|
| 100 48 |
| correct output |
|---|
| POSSIBLE 00000000000000000000 01111111111111111110 01111111111111111110 01111111111111111110 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 27
Verdict: RUNTIME ERROR
| input |
|---|
| 100 380 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 28
Verdict: RUNTIME ERROR
| input |
|---|
| 100 76 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 29
Verdict: RUNTIME ERROR
| input |
|---|
| 100 8 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 30
Verdict: RUNTIME ERROR
| input |
|---|
| 100 98 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 31
Verdict: RUNTIME ERROR
| input |
|---|
| 200 476 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 32
Verdict: RUNTIME ERROR
| input |
|---|
| 200 402 |
| correct output |
|---|
| POSSIBLE 000 010 010 010 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 33
Verdict: RUNTIME ERROR
| input |
|---|
| 200 120 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 34
Verdict: RUNTIME ERROR
| input |
|---|
| 200 60 |
| correct output |
|---|
| POSSIBLE 000000000000 011111111110 011111111110 011111111110 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 35
Verdict: ACCEPTED
| input |
|---|
| 200 721 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| IMPOSSIBLE |
Test 36
Verdict: RUNTIME ERROR
| input |
|---|
| 200 74 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 37
Verdict: ACCEPTED
| input |
|---|
| 200 759 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| IMPOSSIBLE |
Test 38
Verdict: RUNTIME ERROR
| input |
|---|
| 200 134 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 39
Verdict: RUNTIME ERROR
| input |
|---|
| 200 12 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 40
Verdict: RUNTIME ERROR
| input |
|---|
| 200 182 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 41
Verdict: ACCEPTED
| input |
|---|
| 1000 2373 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| IMPOSSIBLE |
Test 42
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 1998 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 43
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 472 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 44
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 286 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 45
Verdict: ACCEPTED
| input |
|---|
| 1000 3603 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| IMPOSSIBLE |
Test 46
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 228 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 47
Verdict: ACCEPTED
| input |
|---|
| 1000 3791 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| IMPOSSIBLE |
Test 48
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 552 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 49
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 48 |
| correct output |
|---|
| IMPOSSIBLE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?Test 50
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 810 |
| correct output |
|---|
| POSSIBLE 000000000000000000000000000000... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 23, in <module>
if left > 0:
NameError: name 'left' is not defined. Did you mean: len?