Submission #17309256


Source Code Expand

Copy
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H, W = map(int, readline().split())
S = np.frombuffer(read(), 'S1').reshape(H, -1)[:, :W]

space = S == b'.'

ans = 0
for _ in range(2):
    ans += np.sum(space[:-1] & space[1:])
    space = space.T

print(ans)

Submission Info

Submission Time
Task B - Futon
User maspy
Language Python (3.8.2)
Score 200
Code Size 364 Byte
Status
Exec Time 108 ms
Memory 27272 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
× 2
× 8
Set Name Test Cases
Sample 01.txt, 02.txt
All 01.txt, 02.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt
Case Name Status Exec Time Memory
01.txt 108 ms 26932 KB
02.txt 100 ms 27272 KB
11.txt 101 ms 27124 KB
12.txt 100 ms 26848 KB
13.txt 103 ms 26816 KB
14.txt 100 ms 27068 KB
15.txt 100 ms 27012 KB
16.txt 100 ms 27008 KB