#
# 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
#
#
# @param s string字符串
# @param t string字符串
# @return int整型
#
class Solution:
def longestUniqueSubsequence(self , s: str, t: str) -> int:
# write code here
if len(s)<len(t):#确保是长串,t是短串
s, t = t, s
if t in s:#or s.find(t)>=0: 查看短串是否在长串中
return -1
else:
return len(s)



京公网安备 11010502036488号