随笔分类 - 字符串
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5414/************************************************* Author :Powatr* Created Time :2015-8-21 10:45...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5371/*先用Manacher算法得出最长回文子串,然后用set维护ans的值对所有回文的长度进行排序, 那么之后的点如果覆盖了最接近的点那么那么点肯定是覆盖了当前点,用二分得到最近不大于u的距离S.upper_b...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5340/*Manacher算法:O(n) 实现最长回文子串算法实现:先向原字符串中插入一个原来串不存在的字符,一般用'#',再O(n)遍历一遍,用一个数组p[i]来记录以str[i]为中心的回文半径(注意str[i...
阅读全文
摘要:Today is the 1st anniversary of BestCoder. Soda, the contest manager, gets a stringsof lengthn. He wants to find three nonoverlapping substringss[l1.....
阅读全文
摘要:Today on a lecture about strings Gerald learned a new definition of string equivalency. Two stringsaandbof equal length are calledequivalentin one of ...
阅读全文
摘要:DescriptionDoctor Ghee is teaching Kia how to calculate the sum of two integers. But Kia is so careless and alway forget to carry a number when the su...
阅读全文
摘要:Problem Description现在有一些被简单压缩的字符串,例如:a[120]代表120个a。对于字符串acb[3]d[5]e相对于acbbbddddde现在给你两个字符串cString, nString.一个是被压缩过的字符串,另一个没有被压缩。求nString是否为cString的子串,...
阅读全文
摘要:Description假如没有阿拉伯数字,我们要怎么表示数字呢小明想了一个方法如下:1 -> A2 -> B3 -> C....25 -> Y26 -> Z27 -> AA28 -> AB....现在请你写一个程序完成这个转换Input输入的第一个数为一个正整数T,表明接下来有T组数据。每组数据为一...
阅读全文

浙公网安备 33010602011771号