题目描述
Given is a permutation P1,…,PN of 1,…,N. Find the number of integers i (1≤i≤N) that satisfy the following condition:
·For any integer j (1≤j≤i), Pi≤Pj.
Constraints
·1≤N≤2×105
·P1,…,PN is a permutation of 1,…,N.
·All values in input are integers.