結果
問題 |
No.923 オセロきりきざむたん
|
ユーザー |
![]() |
提出日時 | 2019-09-26 20:09:26 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 353 ms / 2,000 ms |
コード長 | 400 bytes |
コンパイル時間 | 202 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 20,992 KB |
最終ジャッジ日時 | 2024-09-15 02:48:31 |
合計ジャッジ時間 | 8,257 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 84 |
ソースコード
h, w = map(int, input().split()) f = [[int(c) for c in input()] for _ in range(h)] yes = 2 for i in range(h): same = True for j in range(w): same = same and f[i][j] == f[i][0] if same and yes == 2: yes = 1 for j in range(w): same = True for i in range(h): same = same and f[i][j] == f[0][j] if same and yes == 1: yes = 0 print("YES" if yes > 0 else "NO")