字符串相关
elbadaernu
这个作者很懒,什么都没留下…
展开
-
CodeM美团 初赛B轮 E题 子串(简单模拟)
时间限制:1秒 空间限制:32768K给出一个正整数n,我们把1..n在k进制下的表示连起来记为s(n,k),例如s(16,16)=123456789ABCDEF10, s(5,2)=11011100101。现在对于给定的n和字符串t,我们想知道是否存在一个k(2 ≤ k ≤ 16),使得t是s(n,k)的子串。 输入描述: 第一行一个整数n(1 ≤ n ≤ 50,000)。 第二行一个字原创 2017-06-28 19:37:23 · 791 阅读 · 0 评论 -
Palindrome HDU - 1513 (lcs变形)
A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determines the minimal numbe原创 2017-08-29 15:59:31 · 329 阅读 · 0 评论 -
Common Subsequence HDU - 1159 (lcs简单dp)
Problem Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = #include <iostream> #include <cmath>#include <algorithm>原创 2017-08-29 15:43:07 · 255 阅读 · 0 评论