Code
t = int(input())
for _ in range(t):
n=int(input())
arr = map(int,input().split())
b = sorted(arr)
# print(arr)
# print(b)
a=[]
for i in range(1,n+1):
a.append(i)
# print(i)
if a==b:
print("YES")
else:
print("NO")
Information
- Submit By
- Type
- Submission
- Problem
- P1055 Array Permutation
- Contest
- Brain Booster #3
- Language
- Python 3 (Python 3.12.3)
- Submit At
- 2024-05-06 16:50:17
- Judged At
- 2024-11-11 03:32:45
- Judged By
- Score
- 100
- Total Time
- 17ms
- Peak Memory
- 3.117 MiB