/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 22ms 2.941 MiB
#2 Accepted 25ms 2.953 MiB

Code

t=int(input())
for x in range(t):
    n=int(input())
    a=list(map(int,input().split()))
    li=[]
    for y in range(1,len(a)+1):
        li.append(y)
    a.sort()
    if a==li:
        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 15:09:38
Judged At
2024-11-11 03:35:07
Judged By
Score
100
Total Time
25ms
Peak Memory
2.953 MiB