+ 3

competitive programming

I am trying to understand this question since 1 hour but I can't able to able to comprehend what the question is trying to say. Can someone explain me this question which I have attached as a file? https://code.sololearn.com/ca105a13a12a

9th Dec 2020, 2:18 PM
Gajendra Sonare
Gajendra Sonare - avatar
2 Respostas
+ 4
I did it. check my code answer here.. https://code.sololearn.com/cA6A92a15A21/?ref=app question says we have to find minimum length of set C. C={X | R~X} C is the set of X string such that X ~ R. R is a substring of Input string. and it says we can convert R into X by performing that operation zero or more times. So first get set of all unique substrings from input String. if we perform that operation zero times that mean didn't do anything we get a set C. but question ask for minimum set C. so to get minimum set C, then perform that operation one or more times on each item that has '1' even no. times in set C and check that the result String already in set C. if it is already in remove it. Finally u will get minimum set C.
10th Dec 2020, 1:54 PM
Danuka Sandaruwan
Danuka Sandaruwan - avatar
- 2
Visit Hackerrank
11th Dec 2020, 10:05 AM
Ayush