Submission #37329930


Source Code Expand

def main():
    global N, M, S
    N, M = map(int, input().split())
    S = [input() for _ in range(N)]

    ans = solve()
    print(ans)


def solve():
    ret = 0
    for i in range(N-1):
        si = S[i]

        for j in range(i+1, N):
            sj = S[j]

            for k in range(M):
                if si[k] == 'x' and sj[k] == 'x': break
            else: ret += 1

    return ret


if __name__ == '__main__': main()

Submission Info

Submission Time
Task B - Let's Get a Perfect Score
User hannaheptapod
Language PyPy3 (7.3.0)
Score 200
Code Size 430 Byte
Status AC
Exec Time 65 ms
Memory 65236 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 20
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt, 02_handmade_05.txt, 02_handmade_06.txt, 02_handmade_07.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 65 ms 61892 KiB
00_sample_02.txt AC 46 ms 61708 KiB
00_sample_03.txt AC 48 ms 61784 KiB
01_test_01.txt AC 53 ms 63580 KiB
01_test_02.txt AC 51 ms 62424 KiB
01_test_03.txt AC 54 ms 64104 KiB
01_test_04.txt AC 54 ms 63516 KiB
01_test_05.txt AC 50 ms 62332 KiB
01_test_06.txt AC 53 ms 64436 KiB
01_test_07.txt AC 49 ms 62068 KiB
01_test_08.txt AC 54 ms 63728 KiB
01_test_09.txt AC 53 ms 63692 KiB
01_test_10.txt AC 52 ms 64844 KiB
02_handmade_01.txt AC 48 ms 62400 KiB
02_handmade_02.txt AC 52 ms 64616 KiB
02_handmade_03.txt AC 50 ms 63448 KiB
02_handmade_04.txt AC 53 ms 64072 KiB
02_handmade_05.txt AC 49 ms 63584 KiB
02_handmade_06.txt AC 52 ms 64180 KiB
02_handmade_07.txt AC 52 ms 65236 KiB