結果

問題 No.923 オセロきりきざむたん
ユーザー lam6er
提出日時 2025-04-09 21:01:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 253 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 82,244 KB
実行使用メモリ 78,188 KB
最終ジャッジ日時 2025-04-09 21:02:20
合計ジャッジ時間 7,397 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 33 WA * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

h, w = map(int, input().split())
total = 0
for _ in range(h):
    row = input().strip()
    total += sum(1 - int(c) for c in row)

if total % 2 != 0:
    print("NO")
else:
    if (h-1) * (w-1) % 2 == 0:
        print("YES")
    else:
        print("NO")
0