結果

問題 No.1707 Simple Range Reverse Problem
ユーザー syunsukesyunsuke
提出日時 2021-11-22 17:42:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 395 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 77,616 KB
最終ジャッジ日時 2023-09-06 10:58:23
合計ジャッジ時間 3,322 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,320 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 96 ms
77,616 KB
testcase_09 AC 79 ms
76,604 KB
testcase_10 AC 78 ms
76,536 KB
testcase_11 AC 78 ms
76,376 KB
testcase_12 AC 77 ms
76,448 KB
testcase_13 AC 77 ms
76,572 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

for _ in range(T):
    N = int(input())
    l = list(map(int,input().split()))
    F = 1
    if l[0] != 1 or l[-1] != N:
        F = 0
    L = [0 for i in range(N+1)]
    L[0] = 2
    for i in range(2*N):
        if l[i] > N:
            F = 0
        else:
            L[l[i]] += 1
    if min(L) != 2:
        F = 0
    if F:
        print("Yes")
    else:
        print("No")
0