結果

問題 No.1941 CHECKER×CHECKER(1)
ユーザー ryusuke
提出日時 2022-07-14 11:49:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 250 ms
コンパイル使用メモリ 81,980 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-06-25 18:56:40
合計ジャッジ時間 1,631 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

s = [input() for _ in range(3)]
for i in range(3):
    for j in range(3):
        for dy, dx in ((1, 0), (-1, 0), (0, 1), (0, -1)):
            y = dy + i
            x = dx + j
            if not (0 <= x < 3 and 0 <= y < 3):
                continue
            if s[i][j] == s[y][x]:
                exit(print('No'))

print('Yes')
0