内存限制:128 MB
时间限制:1.000 S
标准输入输出
题目类型:传统
评测方式:文本比较
上传者:
提交:27
通过:8
通过率:29.63%
There is a string that only contains 'r', 'o', 'x', and 'y', now you should find the longest substring which has the same amount of 'r' and 'o' and the same amount of 'x' and 'y', and tell me the length of it.
For example, the string "rrroyxox", the substring "rrroyxox" is the qualifying longest substring, because it has 2 'r's and 2 'o's, and 1 'x' and 1 'y'.
A string with only 'r', 'o', 'x', and 'y'.
The length of the qualifying longest substring.
Values' range:
0 < the length of the input string <= 106