https://www.luogu.com.cn/problem/T231240 https://www.luogu.com.cn/problem/T231486
这是题目的两个版本,条件不一样,范围不一样
有无大佬帮忙写个std()