CF25E.Test
提高+/省选-
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Sometimes it is hard to prepare tests for programming problems. Now Bob is preparing tests to new problem about strings — input data to his problem is one string. Bob has 3 wrong solutions to this problem. The first gives the wrong answer if the input data contains the substring _s_1, the second enters an infinite loop if the input data contains the substring _s_2, and the third requires too much memory if the input data contains the substring _s_3. Bob wants these solutions to fail single test. What is the minimal length of test, which couldn't be passed by all three Bob's solutions?
有时,为编程题目准备测试数据非常困难。现在,Bob 正在为一道关于字符串的新题目准备测试数据——该题目的输入数据为一个字符串。Bob 为此题准备了 3 个错误的解决方案:第一个方案在输入数据中包含子串 s1 时给出错误答案;第二个方案在输入数据中包含子串 s2 时陷入无限循环;第三个方案在输入数据中包含子串 s3 时占用过多内存。Bob 希望这些错误方案在同一个测试用例上全部失败。那么,使得所有三个错误方案均无法通过的最短测试用例长度是多少?
输入格式
There are exactly 3 lines in the input data. The i-th line contains string s__i. All the strings are non-empty, consists of lowercase Latin letters, the length of each string doesn't exceed 105.
输入数据中恰好有 3 行。第 i 行包含字符串 si。所有字符串均非空,仅由小写拉丁字母组成,且每个字符串的长度不超过 105。
输出格式
Output one number — what is minimal length of the string, containing _s_1, _s_2 and _s_3 as substrings.
输出一个数字——包含 s1、s2 和 s3 作为子串的字符串的最短长度是多少。
输入输出样例
输入#1
ab bc cd
输出#1
4
输入#2
abacaba abaaba x
输出#2
11
输入解题思路,AI测评打分。不知道怎么写?