摘要: 要点 998244353的原根g = 3,意味着对于任意$$1 include include include include using namespace std; typedef long long ll; const int p = 998244353, g = 3; int K, b[10 阅读全文
posted @ 2019-04-13 18:18 AlphaWA 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 一开始写的第一步让0和1一起走然后第二步再让0走会挂最后一个点……然后探索一下觉得主要问题在于我模拟的一步一步地走。如果这样的话9 2这个数据会使第17步他俩就碰在final点了,而实际上我们想要的效果是他们走第18步时差一格,然后第20步碰上后大家一起,所以提前碰到会炸。故而要两步两步地走才行,发 阅读全文
posted @ 2019-04-13 12:09 AlphaWA 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 为了物尽其用,Next求出最多有哪部分能重复使用,然后重复使用就行了…… C++ const int maxn = 5e5 + 5; char s[maxn], t[maxn]; int cnts0, cnts1, cntt0, cntt1; int Next[maxn]; int main() { 阅读全文
posted @ 2019-04-13 00:25 AlphaWA 阅读(245) 评论(0) 推荐(0) 编辑