![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字符串
Jason_Wcz
这个作者很懒,什么都没留下…
展开
-
PAT (Advanced Level) 1040 Longest Symmetric String (Manacher)
求字符串最长回文子串 Manacher具体思想:https://www.cnblogs.com/z360/p/6375514.html#include<iostream>#include<cstdio>#include<string>#include<cmath>#include<algorithm>using nam...原创 2018-08-26 12:48:32 · 103 阅读 · 0 评论 -
PAT (Advanced Level) 1047 Student List for Course (字符串哈希及反向哈希)
id反向hash成name,就是正向hash的逆过程 #include<iostream>#include<cstring>#include<cstdio>#include<vector>#include<map>#include<algorithm>using namespace std;int n, ...原创 2018-08-28 23:22:23 · 171 阅读 · 0 评论 -
PAT (Advanced Level) 1071 Speech Patterns (字符串分词)
每个字符串的题都能学到新东西。。。不擅长字符串处理的,去看网上的代码,学到一堆新的函数 传送门这题用isalnum()函数就极其简单。还有个注意点,第一个循环中的第二个if,不能用else if,这样导致字符串最末是非法字符的case过不了,测试数据最后一个case应该就是卡了这个点。#include<bits/stdc++.h>using namespace s...原创 2018-10-04 11:19:08 · 137 阅读 · 0 评论