結果
| 問題 | 
                            No.870 無敵囲い
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Co-3
                         | 
                    
| 提出日時 | 2020-09-21 22:38:43 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 393 bytes | 
| コンパイル時間 | 75 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-06-29 06:44:12 | 
| 合計ジャッジ時間 | 1,415 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 2 | 
| other | AC * 9 WA * 9 | 
ソースコード
a = int(input())
b = ["b","2","8"]
c = ["c","3","9"]
d = ["d","7","9"]
i = "b"
j = "c"
k = "d"
for i in range(a):
    e,f,g,h = map(str,input().split())
    if b == [i,e,f]:
        b = [i,g,h]
    elif c == [j,e,f]:
        c = [j,g,h]
    elif d == [k,e,f]:
        d = [k,g,h]
if b == ["b","5","8"] and c == ["c","4","8"] and d == ["d","6","8"]:
    print("YES")
else:
    print("NO")
    
            
            
            
        
            
Co-3