+ 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
2 Antworten
+ 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.
- 2
Visit Hackerrank