
字符串操作
team39
喜欢写注释
展开
-
寻找最大数(三)
寻找最大数(三)时间限制:1000 ms | 内存限制:65535 KB难度:2描述 给出一个整数N,每次可以移动2个相邻数位上的数字,最多移动K次,得到一个新的整数。求这个新的整数的最大值是多少。输入 多组测试数据。每组测试数据占一行,每行有两个数N和K (1 ≤ N≤ 10^18; 0 ≤ K ≤ 100).原创 2018-02-01 15:25:37 · 221 阅读 · 0 评论 -
初学者的烦恼&&字符串右移
当字符串左移时,正序排序;当字符串右移时,倒序排序; 初学者的烦恼时间限制:1000 ms | 内存限制:65535 KB难度:1描述小c才开始学习c语言,让他最烦恼的就是对字符数组的操作。小C的好朋友小E为了激励他,出了这样一个题目:字符串的移动输出。并给他许诺说,如果他能够在有限的时间内编写出这道题目的代码,并顺利通过就请他去吃大餐,于是小C便认真的敲这个题目的...原创 2017-12-02 10:38:42 · 491 阅读 · 0 评论 -
Palindrome(manacher算法)
PalindromeTime Limit: 15000MS Memory Limit: 65536KTotal Submissions: 11080 Accepted: 4212DescriptionAndy the smart computer science student was attending an algorithms class when the professor asked t...原创 2018-04-05 10:42:16 · 389 阅读 · 0 评论 -
Quick Search —— 快速匹配字符串
注: 正确性有待考察,因为没有题试试水转载:https://blog.youkuaiyun.com/superhackerzhang/article/details/6432559 算法说明:令模式串为p={p[0],p[1],...,p[m-1]},长度为m。文本串为T={T[0],T[1],...,T[n-1]},长度为n.要求n>=m.令k为p在T上的对齐位置...转载 2018-07-14 15:36:19 · 1869 阅读 · 0 评论 -
A - Edit Distance Gym - 102001A
A - Edit Distance Gym - 102001A A binary string is a non-empty sequence of 00's and 11's, e.g., 010110, 1, 11101, etc. The edit distance of two binary strings SS and TT, denoted by edit(S,T)edit(S...原创 2019-01-09 15:59:01 · 732 阅读 · 0 评论 -
L - Binary String Gym - 102001L
L - Binary String Gym - 102001L A binary string is a non-empty sequence of 00's and 11's, e.g., 010110, 1, 11101, etc. Ayu has a favorite binary string SS which contains no leading zeroes. She wan...原创 2019-01-09 17:34:25 · 656 阅读 · 1 评论