链接:https://codeforces.com/contest/1265/problem/B You are given a permutation p=[p1,p2,…,pn]p=[p1,p2,…,pn] of integers from 11 to nn. Let's call the number mm (1≤m≤n1≤m≤n) beautiful, if there exists two indices l,rl,r (1≤l≤r≤n1≤l≤r≤n), such that the numbers [pl,pl+1,…,pr][pl,pl+1,…,pr] is a permutati...