您当前的位置: 首页 > 

先求一个导

暂无认证

  • 6浏览

    0关注

    289博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

程序设计天梯赛L3-29 还原文件 (原来是字符串哈希优化dfs)

先求一个导 发布时间:2022-04-21 16:37:00 ,浏览量:6

题目 题意: 略。 思路: 用字符串哈希优化dfs。 时间复杂度: O(能过) 代码:

#include
using namespace std;
typedef unsigned long long ull;
const int N = 1e5+10;
const int P = 131;
int a[N];
vector va[102],v,res;
bool vis[N];
bool flag = 0;
int n,m,k,T;
ull p[N],h[N],f[N];
ull get(int l,int r)
{
	return h[r] - h[l-1]*p[r-l+1];
}
bool dfs(int cur,int now)
{
	// cout            
关注
打赏
1662037414
查看更多评论
0.0492s