Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2022-10-3总结 | Ptilopsis_w's little blog #36

Open
Ptilopsisw opened this issue Oct 3, 2022 · 0 comments
Open

2022-10-3总结 | Ptilopsis_w's little blog #36

Ptilopsisw opened this issue Oct 3, 2022 · 0 comments

Comments

@Ptilopsisw
Copy link
Owner

https://ptilopsisw.github.io/2022/10/03/2022-10-3%E6%80%BB%E7%BB%93/

分组 将字符串反转一下,后缀就变成前缀了,然后就可以扔到 trie 树上了,考虑统计子树和,我们就可以知道某一个前缀可以匹配多少个字符串了,然后贪心一手,尽量能匹配的前缀都匹配上就行了。 #include #include using namespace std; typedef long long ll;const int N = 1e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant