結果

問題 No.1941 CHECKER×CHECKER(1)
ユーザー ryusukeryusuke
提出日時 2022-07-14 11:49:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 71,468 KB
最終ジャッジ日時 2023-09-08 01:50:50
合計ジャッジ時間 2,599 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,356 KB
testcase_01 AC 67 ms
71,460 KB
testcase_02 AC 68 ms
71,064 KB
testcase_03 AC 67 ms
71,284 KB
testcase_04 AC 75 ms
71,320 KB
testcase_05 AC 69 ms
71,468 KB
testcase_06 AC 69 ms
71,404 KB
testcase_07 AC 68 ms
71,316 KB
testcase_08 AC 70 ms
71,240 KB
testcase_09 AC 68 ms
71,388 KB
testcase_10 AC 69 ms
71,348 KB
testcase_11 AC 67 ms
71,084 KB
testcase_12 AC 69 ms
71,244 KB
testcase_13 AC 69 ms
71,388 KB
testcase_14 AC 67 ms
71,228 KB
権限があれば一括ダウンロードができます

ソースコード

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