Please read the new rule regarding the restriction on the use of AI tools. ×

vk705017's blog

By vk705017, history, 19 months ago, In English

please correct me where i am wrong in question B.

i have implemented using finding longest common substring.

https://codeforces.me/problemset/submission/1796/195409270

edited-->GOT IT THANKS

  • Vote: I like it
  • -5
  • Vote: I do not like it

| Write comment?
»
19 months ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

if the first character of s and t are equal c, then output c* if the last character of s and t are equal c, then output *c

else you have to check if any adjacent pair of s appear in t, if yes, output * (2 characters) * else the answer is NO

p/s: sorry for my bad English, do you understand it? see my solution for better understanding My code in Python