摘要:
链接:http://poj.org/problem?id=2406 Power Strings Time Limit: 3000MS Memory Limit: 65536K Description Given two strings a and b we define a*b to be thei 阅读全文
摘要:
链接:https://www.luogu.org/problemnew/show/P4735 题目描述 给定一个非负整数序列 \{a\}{a} ,初始长度为 NN 。 有M个操作,有以下两种操作类型: 输入输出格式 输入格式: 第一行包含两个整数 N,MN,M ,含义如问题描述所示。第二行包含 NN 阅读全文
摘要:
链接:https://www.luogu.org/problemnew/show/P3806 我学习点分治的模板:https://www.cnblogs.com/Paul-Guderian/p/6782671.html 题目描述 给定一棵有n个点的树 询问树上距离为k的点对是否存在。 输入输出格式 阅读全文
摘要:
Priest John's Busiest Day Time Limit: 2000MS Memory Limit: 65536K Description John is the only priest in his town. September 1st is the John's busiest 阅读全文
摘要:
题解: 第一题:AC自动机上dp 这道题前面yyr学长讲过,但我完全忘了,学习的效率真的低啊 先补全Trie图,dp[i][j]表示走了i步,现在在j号节点的方案数; 但是好的字符串不能直接求,所以补集转换,用总的情况(26^m) - 不合法的的情况(dp[m][i], i不是结束节点) 在跑dp的 阅读全文