07 2020 档案

摘要:题意等价于对$S$的$|S|$个后缀进行$f$操作,求这|S|个操作后的后缀的本质不同的子串个数 把每个操作后的后缀翻转后插入字典树 当所有后缀都插入字典树之后建广义后缀自动机 直接统计答案即可 #include<bits/stdc++.h> using namespace std; typedef 阅读全文
posted @ 2020-07-23 11:00 Zeronera 阅读(174) 评论(0) 推荐(0)
摘要:$Fibonacci$数列的通项公式: \(F_n=\frac{1}{\sqrt5}\bigg[(\frac{1+\sqrt5}{2})^n-(\frac{1-\sqrt5}{2})^n\bigg]\) 令: \(a=\frac{1+\sqrt5}{2}\) \(b=\frac{1-\sqrt5}{ 阅读全文
posted @ 2020-07-23 10:31 Zeronera 阅读(206) 评论(0) 推荐(0)
摘要:#include <ctime> #include <iostream> #include <unordered_map> using namespace std; const int N = 2e5; void insert_numbers(long long x) { clock_t begin 阅读全文
posted @ 2020-07-15 09:22 Zeronera 阅读(949) 评论(0) 推荐(0)
摘要:$[1,n]$异或和 int xor_n(int n) //从1到n的异或和 { int t = n & 3; if (t & 1) return t / 2 ^ 1; return t / 2 ^ n; } $[n,m]$按位或和 从高位开始,对于第一个不同的位置$i$,$n$的第$i$位一定为$ 阅读全文
posted @ 2020-07-05 16:43 Zeronera 阅读(141) 评论(0) 推荐(0)