結果
| 問題 | 
                            No.1941 CHECKER×CHECKER(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-05-26 18:47:36 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 34 ms / 2,000 ms | 
| コード長 | 351 bytes | 
| コンパイル時間 | 104 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-09-20 15:04:26 | 
| 合計ジャッジ時間 | 1,281 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 12 | 
ソースコード
g=[input() for _ in range(3)]
def check(i,j):
    f=True
    dy=[1,0,-1,0];dx=[0,1,0,-1]
    for k in range(4):
        y=i+dy[k];x=j+dx[k]
        if 0<=y<3 and 0<=x<3:
            if g[i][j]==g[y][x]:
                f=False
    return f
ans=True
for i in range(3):
    for j in range(3):
        ans=ans and check(i,j)
print('Yes' if ans else 'No')