Submit | All submissions | Best solutions | Back to list |
EIUCARD - Card game |
Nobita and Chaien have some magic cards and want to play together. Each player will choose a same number of cards and compare to the other's cards. If the cards in same position are same, it is a draw set. Chaien had choose his cards and Notita ask you to help him choose a list of continous cards which leads to as much draw set as possible. A card is represented by an characters and list of cards is a string. If there is many solutions, output index of the first substring which Nobita can choose.
Input
The first line is the string representing the cards Chaien chose.(denoted by c)
The first line is the string representing the cards Nobita have.(denoted by s)
Output
The index of the first substring which meet to the requirements and number of cards. Please note the (|s|>= |c|).
Example
Input: abcdezqlowtp abcdefghiklm Output: 0 5
Input: acb dbadbeacb Output: 6 3
Added by: | Ha Minh Ngoc |
Date: | 2019-06-20 |
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 |