/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 21ms 3.051 MiB
#2 Accepted 24ms 3.047 MiB

Code

T=int(input())
for i in range(0,T):
    N=int(input())
    A=list(map(int,input().split()))
    if len(set(A))==N and sorted(A)==list(range(1,N+1)):
        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:35:32
Judged At
2024-11-11 03:32:59
Judged By
Score
100
Total Time
24ms
Peak Memory
3.051 MiB