結果
問題 |
No.1707 Simple Range Reverse Problem
|
ユーザー |
![]() |
提出日時 | 2021-10-15 21:36:49 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 62 ms / 2,000 ms |
コード長 | 350 bytes |
コンパイル時間 | 243 ms |
コンパイル使用メモリ | 81,732 KB |
実行使用メモリ | 75,348 KB |
最終ジャッジ日時 | 2025-07-13 03:50:52 |
合計ジャッジ時間 | 1,865 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 19 |
ソースコード
T = int(input()) for _ in range(T): N = int(input()) A = list(map(int, input().split())) B = list(range(1, N + 1)) + list(range(1, N + 1)) if A == B: print('Yes') continue for i in range(N): if B[:i + 1] + B[i + N - 1:i:-1] + B[i + N:] == A: print('Yes') break else: print('No')