Submit | All submissions | Best solutions | Back to list |
EI2223Q1ADAF2 - REMOVING CHARACTERS |
Given a string S and a pattern P . Delete some characters in the text to form the maximum consecutive pattern strings. What is the maximum number of pattern strings can be created?
Input
The first line is the string S (0 ≤ |S| ≤ 105)
The second line is the string P (0 ≤ |P| ≤ 105).
Both strings contain only lowercase characters.
Output
A single number which is the maximum number of patterns can be created
Sample
Input |
Output |
abcdbacdb acb |
2 |
Added by: | Ha Minh Ngoc |
Date: | 2022-12-26 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET |