You are given a string ss. You should answer nn queries. The ii-th query consists of integer kiki and string mimi. The answer for this query is the minimum length of such a string tt that tt is a substring of ss and mimi has at least kiki occurrences…
[CF1132F]Clear the String(动态规划) 题面 CF 题解 考虑区间\(dp\). 增量考虑,每次考虑最后一个字符和谁一起删去,然后直接转移就行了. #include<iostream> #include<cstdio> #include<cstring> using namespace std; #define MAX 505 int f[MAX][MAX],n;char s[MAX]; int main() { scanf("%d%s…
[CF1097F]Alex and a TV Show(bitset) 题面 洛谷 CF 题解 首先模\(2\)意义下用\(bitset\)很明显了. 那么问题在于怎么处理那个\(gcd\)操作. 然后就莫比乌斯反演一下:\(f[n]=\sum\limits_{n|d}g[d],g[n]=\sum\limits_{n|d}\mu(\frac{d}{n})f[d]\),发现这样子搞完之后,如果要处理集合\(g\)的\(gcd\)操作,就是把\(g\)变成\(f\)之后再按位乘起来(二进制意义下的按…
help 命令,3种形式: help 命令 形式 help @<group> 比如:help @generic.help @string.help @hash.help @list.help @set.help @sorted_set.help @transactions 等 help <command> help <tab> help @group 命令中,group 的类型: group 类型 备注 cluster help @cluster,查看集群信息 gene…