Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
字符串
Time Limit: 3000ms, Special Time Limit:7500ms, Memory Limit:65536KB
Total submit users: 2, Accepted users: 2
Problem 10697 : No special judgement
Problem description
  给你两个字符串AB(都是小写字符),你的任务是删除A中最少字符,使B不是A的子串。例如A串为ababaB串为ab,那么我们最少只需删去两个字母,比如第一、三个字母,就可以满足要求。

Input
  输入包含多组数据。

每组数据包括两行,分别是字符串AB

Output
  每组数据输出一行,即最少字符数。

Sample Input
ababaa
aba
Sample Output
1
Judge Tips
  数据规模:对于40%的数据,A串长度小于10

          对于100%的数据,A串长度小于10000B串长度小于1000

Problem Source
  HNU Contest 

Submit   Discuss   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:2163 today,16258890 total, since 2010-05-07