結果
問題 | No.819 Enjapma game |
ユーザー |
![]() |
提出日時 | 2019-04-21 19:36:02 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 523 bytes |
コンパイル時間 | 101 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-07 05:59:55 |
合計ジャッジ時間 | 1,770 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 11 WA * 15 |
ソースコード
H, W = map(int, input().strip().split(' ')) odd = 0 even = 0 for i in range(H): row = input().strip() for j in range(W): if row[j] != 'o': continue state = H - i + j if state % 2 == 0: even += 1 else: odd += 1 if odd % 2 == 0: if even % 2 == 0: print('YES') else: print('NO') else: if even % 2 == 0: if odd == 1: print('NO') else: print('YES') else: print('NO')