結果
問題 |
No.819 Enjapma game
|
ユーザー |
![]() |
提出日時 | 2019-04-21 18:40:02 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 459 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-06 20:43:35 |
合計ジャッジ時間 | 2,142 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
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('NO') else: print('YES') else: if even % 2 == 0: print('YES') else: print('NO')