3 人解决,3 人已尝试。
3 份提交通过,共有 5 份提交。
7.3 EMB 奖励。
单点时限: 5.0 sec
内存限制: 256 MB
Making revolutions in the software industry is not an easy task. That’s why this problem is about something else. Stanescu has just invented a new super-cool way to develop software. It is similar to writing program code, but instead of writing it, you ask some else to do it. In such way, one could create great software, without even knowing what a Turing Machine is. As you can see, this is not just software industry revolution. Really, Stanescu does not care about the software industry at all. He just wants to make money.
In order to protect the money he is going to make, he needs to pick a special password for his bank account, satisfying the following requirements:
You have to write a program that computes the complexity of simplest possible password.
Several test cases are given at the input. Each of them consists of a single line containing the pattern and the super-password strings separated by a white space.
For each test case, your program should print a single line with one integer – the complexity of the simplest possible password. If no password satisfies the given requirements, the program should print -1.
a?a alabala a*c?a axcbaabcbax
4 9 Explanation aba is the simplest password abcba is simpler than axcba
3 人解决,3 人已尝试。
3 份提交通过,共有 5 份提交。
7.3 EMB 奖励。
创建: 15 年前.
修改: 7 年,2 月前.
最后提交: 6 年,7 月前.