結果

問題 No.2121 帰属関係と充足可能性
ユーザー 👑 rin204rin204
提出日時 2022-11-04 21:50:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 273 bytes
コンパイル時間 137 ms
コンパイル使用メモリ 82,156 KB
実行使用メモリ 52,096 KB
最終ジャッジ日時 2024-07-18 22:15:08
合計ジャッジ時間 2,962 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(n, A):
    if A.count(A[2]) != 1:
        return False
    if n <= 2:
        return False
    if A[0] == A[5]:
        return False
    return True
    

n = int(input())
A = list(map(int, input().split()))

if solve(n, A):
    print("YES")
else:
    print("NO")
0