摘要: 题目 官方题解 T1: 一道水题 #include<iostream> #include<cstring> #include<cstdio> #include<cmath> #include<algorithm> #include<stack> using namespace std; inline 阅读全文
posted @ 2018-11-06 13:02 siruiyang_sry 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 题目 官方题解 T1: 我们可以把问题化简为$a\times b \times c \leq n $中的有序$(a,b,c)$有多少组。分三种情况考虑 当$a=b=c$时,答案十分好统计 当$a<b<c$时,统计完答案$\times 6$ 当$a=b$ and $a<c$时,答案$\times 3$ 阅读全文
posted @ 2018-11-06 12:55 siruiyang_sry 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 题目pdf 官方题解 T1: 我们可以发现此题若要求$[L,R]$区间的答案,其实就是再求前缀和,我们设$b$为当前出现次数最多的字符,$c$为最小,所以答案为$s[b]_r-s[c]_r-(s[b]_{l-1}-s[c]_{l-1})$,其实我们可以用一个数组$minv[b][c]$记录这个式子$ 阅读全文
posted @ 2018-11-06 09:54 siruiyang_sry 阅读(142) 评论(0) 推荐(0) 编辑