随笔分类 -  字符串—Hash

摘要:把第一个字符串拼接后就是hash + 最小表示法板子了。 #include <iostream> #include <cstring> #include <cstdio> using namespace std; const int N=4000010,P=131; string s, t, ss; 阅读全文
posted @ 2021-03-05 09:16 脂环 阅读(61) 评论(0) 推荐(0) 编辑
摘要:链接:https://ac.nowcoder.com/acm/contest/9984/B 来源:牛客网 题目描述 众所周知,武辰延很喜欢字符串。 这天,他对着两个字符串 s 和 t 发呆,他发现这两个串的前缀有很多相似的地方,s 的两个前缀连接起来竟也是 t 的前缀。 武辰延想知道有多少对 s 的 阅读全文
posted @ 2021-02-19 23:55 脂环 阅读(89) 评论(0) 推荐(0) 编辑
摘要:Let's define the Fibonacci sequence F1,F2, as F1=1,F2=2,Fi=Fi1+Fi2 (i3). It's well known that every positive intege 阅读全文
posted @ 2020-07-27 17:02 脂环 阅读(231) 评论(0) 推荐(0) 编辑
摘要:You may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this is really true. Your program will read 阅读全文
posted @ 2020-04-02 23:38 脂环 阅读(180) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
主题色彩