摘要: (转自Acwing Object_ ) https://www.acwing.com/problem/content/submission/code_detail/3591337/ 题目连接 #include<bits/stdc++.h> using namespace std; const int 阅读全文
posted @ 2021-01-24 23:54 har74 阅读(225) 评论(0) 推荐(0)
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=100010; 4 int n,g[N]; 5 int lowbit(int x) 6 { 7 return x & -x; 8 } 9 int main() 10 { 11 阅读全文
posted @ 2020-11-09 20:36 har74 阅读(64) 评论(0) 推荐(0)
摘要: 恢复内容开始 1. 优秀的拆分 一般来说,一个正整数可以拆分成若干个正整数的和。 例如,1=1,10=1+2+3+41=1,10=1+2+3+4 等。 对于正整数 nn 的一种特定拆分,我们称它为“优秀的”,当且仅当在这种拆分下,nn 被分解为了若干个不同的 22 的正整数次幂。 注意,一个数 xx 阅读全文
posted @ 2020-11-09 11:52 har74 阅读(657) 评论(0) 推荐(0)
摘要: ①洛谷P4391 (https://www.luogu.com.cn/problem/P4391) 题目描述: 思路 假设最短需要x长度的子串进行自我复制,也就是说ne[x+0]=0, ne[x+1]=1 ,ne[x+2] =2,..... 那么答案很明显就是 n - ne[n] AC代码#incl 阅读全文
posted @ 2020-10-22 21:26 har74 阅读(78) 评论(0) 推荐(0)
摘要: 模板 ```cpp #include<bits/stdc++.h> using namespace std; const int N=100010; char q[N],a[N]; int ne[N]; int main() { int n,m; cin>>n>>q+1>>m>>a+1; for(i 阅读全文
posted @ 2020-10-21 20:10 har74 阅读(85) 评论(0) 推荐(0)