Submission details
Task:Palindromi
Sender:Joonao
Submission time:2025-10-30 13:03:56 +0200
Language:Python3 (CPython3)
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.02 sdetails
#20.02 sdetails
#30.02 sdetails
#40.02 sdetails
#50.02 sdetails
#60.02 sdetails
#70.02 sdetails
#80.02 sdetails
#90.02 sdetails
#100.02 sdetails

Code

n, m, k = map(int, input().split())
kx = []
ky = []
kerroin = 0
for i in range(k):
    x, y = input().split()
    x = int(x)
    y = int(y)
    kx.append(x)
    ky.append(y)
for a in range(1, n+1):
    for b in range(1, m+1):
        if b == m:
            if kx[kerroin] == a:
                if ky[kerroin] == b:
                    print("*")
                    if len(kx)-1 > kerroin:
                        kerroin += 1
            else:
                print(".")
        else:
            if kx[kerroin] == a:
                if ky[kerroin] == b:
                    print("*", end="")
                    if len(kx)-1 > kerroin:
                        kerroin += 1
                else:
                    if kx[kerroin] == kx[kerroin-1] and kx[len(kx)-1] == kx[kerroin]:
                        print("=", end="")
                    else:
                        print(".", end="")
            else:
                print(".", end="")

Test details

Test 1 (public)

Verdict:

input
datatahti

correct output
3

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 1, in <module>
    n, m, k = map(int, input().split())
ValueError: invalid literal for int() with base 10: 'datatahti'

Test 2 (public)

Verdict:

input
saippuakauppias

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 1, in <module>
    n, m, k = map(int, input().split())
ValueError: invalid literal for int() with base 10: 'saippuakauppias'

Test 3 (public)

Verdict:

input
a

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 1, in <module>
    n, m, k = map(int, input().split())
ValueError: invalid literal for int() with base 10: 'a'

Test 4 (public)

Verdict:

input
aa

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 1, in <module>
    n, m, k = map(int, input().split())
ValueError: invalid literal for int() with base 10: 'aa'

Test 5 (public)

Verdict:

input
abc

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 1, in <module>
    n, m, k = map(int, input().split())
ValueError: invalid literal for int() with base 10: 'abc'

Test 6 (public)

Verdict:

input
aybabtu

correct output
2

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 1, in <module>
    n, m, k = map(int, input().split())
ValueError: invalid literal for int() with base 10: 'aybabtu'

Test 7 (public)

Verdict:

input
abacabaca

correct output
2

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 1, in <module>
    n, m, k = map(int, input().split())
ValueError: invalid literal for int() with base 10: 'abacabaca'

Test 8 (public)

Verdict:

input
bbbbaaaababbbbbaabaaabaaaaabab...

correct output
23

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 1, in <module>
    n, m, k = map(int, input().split())
ValueError: invalid literal for int() with base 10: 'bbbbaaaababbbbbaabaaabaaaaababaaabbaaabbabbaabbbaaaaababababaabaaabbaaabbbbaaabaaabaaabababbabbabaaa'

Test 9 (public)

Verdict:

input
acbaaabaabaddaccdcccbcdbdddacd...

correct output
38

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 1, in <module>
    n, m, k = map(int, input().split())
ValueError: invalid literal for int() with base 10: 'acbaaabaabaddaccdcccbcdbdddacdcddaadddbbcbbbdaccdadbbbdddacbaacadccddabaaadbdcccdcdaacdcbbbbaadababb'

Test 10 (public)

Verdict:

input
uaqtmfftecryanvpshxsodjrllqnqp...

correct output
49

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 1, in <module>
    n, m, k = map(int, input().split())
ValueError: invalid literal for int() with base 10: 'uaqtmfftecryanvpshxsodjrllqnqpunxichcvbqovfwjthwiewmzwpivtdtdlwbkioipatbbhcvepukdoswafxivrdggsapvlmh'