結果
問題 | No.1707 Simple Range Reverse Problem |
ユーザー |
|
提出日時 | 2021-10-15 23:33:53 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 374 bytes |
コンパイル時間 | 210 ms |
コンパイル使用メモリ | 82,060 KB |
実行使用メモリ | 61,488 KB |
最終ジャッジ日時 | 2024-09-17 18:37:49 |
合計ジャッジ時間 | 1,753 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 15 WA * 3 |
ソースコード
T = int(input())for _ in range(T):N = int(input())A = list(map(int,input().split()))X = []for x in range(1,N+1):X.append(x)X.append(x)X.sort()AS = sorted(A)if X != AS:print('No')continuecount = 0for i in range(1,2*N):if abs(A[i-1]-A[i]) > 1:count += 1if count == 1:print('Yes')else:print('No')