Submission #70595103


Source Code Expand

n, m = map(lambda s_: int(s_), input().split())
s = [input() for _ in range(n)]
t = {
    "".join(s[i][r - m: r] for i in range(l - m, l))
    for l in range(m, n + 1)
    for r in range(m, n + 1)
}
print(len(t))

Submission Info

Submission Time
Task B - Count Subgrid
User wasd314
Language Python (CPython 3.13.7)
Score 250
Code Size 221 Byte
Status AC
Exec Time 12 ms
Memory 9204 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 250 / 250
Status
AC × 2
AC × 19
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All 1000000007_01.txt, 1000000007_02.txt, 998244353_01.txt, 998244353_02.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
1000000007_01.txt AC 11 ms 9152 KiB
1000000007_02.txt AC 11 ms 9144 KiB
998244353_01.txt AC 11 ms 9048 KiB
998244353_02.txt AC 11 ms 9048 KiB
random_01.txt AC 11 ms 9088 KiB
random_02.txt AC 11 ms 9168 KiB
random_03.txt AC 11 ms 9168 KiB
random_04.txt AC 12 ms 9088 KiB
random_05.txt AC 11 ms 9164 KiB
random_06.txt AC 11 ms 9168 KiB
random_07.txt AC 12 ms 9152 KiB
random_08.txt AC 11 ms 9048 KiB
random_09.txt AC 11 ms 9152 KiB
random_10.txt AC 11 ms 9152 KiB
random_11.txt AC 11 ms 9204 KiB
random_12.txt AC 11 ms 9152 KiB
random_13.txt AC 11 ms 9204 KiB
sample_01.txt AC 11 ms 9080 KiB
sample_02.txt AC 11 ms 9168 KiB