結果

問題 No.819 Enjapma game
ユーザー convexineqconvexineq
提出日時 2021-03-23 06:01:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 361 ms
コンパイル使用メモリ 82,456 KB
実行使用メモリ 61,880 KB
最終ジャッジ日時 2024-11-24 21:51:02
合計ジャッジ時間 2,234 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

h,w = map(int,input().split())
b = [input() for _ in range(h)]
r = [0,0]
cnt = 0
for i in range(h):
    for j in range(w):
        if b[i][j] == "o":
            cnt += 1
            r[(i+j)%2] += 1
print("YES" if (cnt+r[0])%3==0 else "NO")
0