题目描述
Please Count how many sub strings of “algorithms” is there in the given string. For a given string S, find how many different sub strings s[i] (s[i-1] < s[i],1 <= i < 10), that S[si] is “algorithms”. For the answer may be very big, mod 2012031815.
输入
Line 1 is an integer N ( N <= 100 ) indicate the number of test cases. N line followed , every line contains a string S (the length of S is not greater than 10000, all the letter will be lower case )
输出
N Lines each line is the answer of the test case.
3
algorithms
aalgorithms
lgorithmsa