#C. 土拨鼠串

    Type: Default 1000ms 6MiB

土拨鼠串

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目背景

给定字符串ss, 如果其中有子串s1s_1和子串s2s_2,我们就称ss为土拨鼠串。如果只含有s1s_1,则称为A串,如果只含有s2s_2,则称为B串。其中,s2s_2s1s_1的倒序。如:s1s_1=“abc”,则s2s_2=“cba”。

题目描述

给定sss1s_1,求s2s_2

输入输出

若同时含有s1s_1s2s_2, 输出Both;若为A串,输出A;若为B串,输出B;若不是土拨鼠串,输出None。

样例

abccba
abc
Both

提示

时间限制:1s 内存限制:6MB

ss中可能含有空白符,但s1s_1s2s_2中没有。

1s1,s2s1001 \leq s_1,s_2 \leq s \leq 100

zzy

Not Attended
Status
Done
Rule
Ledo
Problem
4
Start at
2024-5-26 15:45
End at
2024-5-26 16:25
Duration
0.7 hour(s)
Host
Partic.
2