CF928D.Autocompletion
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
The only line contains Arcady's text, consisting only of lowercase latin letters, spaces, line feeds and the following punctuation signs: «.», «,», «?», «!», «'» and «-». The total amount of symbols doesn't exceed 3⋅105 . It's guaranteed that all lines are non-empty.
输入格式
Print a single integer — the minimum number of clicks.
输出格式
In sample case one it's optimal to use autocompletion for the first instance of «snowboarding» after typing up «sn» and for the second instance of «snowboarding» after typing up «snowb». This will save 7 clicks.
In sample case two it doesn't matter whether to use autocompletion or not.
输入输出样例
输入#1
snow affects sports such as skiing, snowboarding, and snowmachine travel. snowboarding is a recreational activity and olympic and paralympic sport.
输出#1
141
输入#2
'co-co-co, codeforces?!'
输出#2
25
输入#3
thun-thun-thunder, thunder, thunder thunder, thun-, thunder thun-thun-thunder, thunder thunder, feel the thunder lightning then the thunder thunder, feel the thunder lightning then the thunder thunder, thunder
输出#3
183
说明/提示
In sample case one it's optimal to use autocompletion for the first instance of «snowboarding» after typing up «sn» and for the second instance of «snowboarding» after typing up «snowb». This will save 7 clicks.
In sample case two it doesn't matter whether to use autocompletion or not.