09 2023 档案
摘要:T1 给一个长度是 nnn 的仅含有小写字母的字符串sss,求 sss 的不同非空子序列一共有多少个,答案对 100000000710000000071000000007 取模。 下面给出子序列定义: 字符串的子序列是经由原字符串删除 kkk 个(kkk 有可能等于 000)字符但不改变剩余字符相对
阅读全文
摘要:边双连通分量 #include<bits/stdc++.h> using namespace std; const int M=2e6+10,N=5e5+10; int n,m; struct EDGE{int to,next;}ee[M]; int head[N],ne=1,nm; inline
阅读全文
摘要:#define FIO //开启加速模式 将不能使用键盘读入 struct IO { #ifdef FIO const static int BUFSIZE = 1 << 20; char buf[BUFSIZE], obuf[BUFSIZE], *p1, *p2, *pp; inline char
阅读全文
摘要:原题链接 Solution 在一个长度为 2×n2\times n2×n 的序列 aaa 中,可以拿出序列最左边,最右边的数。放到 bbb 序列的末尾,使得 bbb 序列回文。 以下对先选左边的数进行讨论。先选右边的数同理。 若已选了一个数,因为要求回文,那么最后一个数也会被确定。假设最后一个数在序
阅读全文