Mature Restaurateur

查看题解 查看答案
题目描述
Time Limit: 2000 ms
Memory Limit: 256 mb

请先登录再刷题,不会做的题目右上可以查看题解和答案~

输入输出格式
输入描述:
Multiple sets of input.
Each group just one line, s, represents the menu sequence.All the letters are uppercase and within 
{A,B,C,D,E,F,G,H,I,J}. 1≤|s|≤1e5。
输出描述:
Output an integer indicating the minimum amount of time you need to spend planting.
输入输出样例
输入样例#:
EIGJBB
输出样例#:
复制
9
提示
The sample explain:
farm planting situation (The serial number 1 indicates the ingredient grown on the earliest farmland, 
the serial number 2 indicates the second earliest, and the serial number 3 indicates the latest) :
1 2 3
a b b
b c c
c c c
c a b
a b a
a b a
The order in which ingredients are grown: abbcccaba.
重置

提交代码后在此处可查看状态