結果

問題 No.1707 Simple Range Reverse Problem
ユーザー O2MTO2MT
提出日時 2021-10-15 23:29:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 232 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 81,768 KB
実行使用メモリ 60,068 KB
最終ジャッジ日時 2023-10-17 21:19:12
合計ジャッジ時間 1,908 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,500 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 44 ms
60,068 KB
testcase_05 AC 45 ms
60,068 KB
testcase_06 AC 46 ms
60,060 KB
testcase_07 AC 44 ms
60,060 KB
testcase_08 AC 44 ms
60,060 KB
testcase_09 AC 43 ms
60,060 KB
testcase_10 AC 42 ms
60,060 KB
testcase_11 AC 41 ms
60,052 KB
testcase_12 AC 41 ms
60,052 KB
testcase_13 AC 41 ms
60,052 KB
testcase_14 AC 42 ms
60,060 KB
testcase_15 AC 42 ms
60,060 KB
testcase_16 AC 43 ms
60,060 KB
testcase_17 AC 41 ms
60,052 KB
testcase_18 AC 42 ms
60,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
  N = int(input())
  A = list(map(int,input().split()))
  count = 0
  for i in range(1,2*N):
    if abs(A[i-1]-A[i]) > 1:
      count += 1
  if count == 1:
    print('Yes')
  else:
    print('No')
0