http://acm.hdu.edu.cn/showproblem.php?pid=5414 题意:给定字符串s和t,可以在s里面选一个字符c,然后任选一个字符d(d!=c)将d插入到c的后面,问能不能将s变为t. 分析:只要前面t串连续的字符==s字符串,而且保证s是t的子串.本来想不通s:aabaa,t:aabaaaa,后面四个a怎么插,后来才想明白,后面的a都可以插在b后面,就可以了. CRB and String Time Limit: 2000/1000 MS (Java/Others…
Problem Description CRB has two strings s and t. In each step, CRB can select arbitrary character c of s and insert any character d (d ≠ c) just after it. CRB wants to convert s to t. But is it possible? Input There are multiple test cases. The fir…
CRB and String Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 543 Accepted Submission(s): 208 Problem Description CRB has two strings s and t. In each step, CRB can select arbitrary character c o…
CRB and String Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 491 Accepted Submission(s): 186 Problem Description CRB has two strings s and t. In each step, CRB can select arbitrary charact…