In my solution i sorted the rings by comparison like this , if ring A can be put into ring B then A is before B. If A can not be put in B and B can not be put in A then i sort by size of radius.
After that using something like dynamic programming and a map find the best solution.
10Q very much , i solved it. My first mistake was that i firstly misunderstood the problem and set the result to the beginning on 1 instead of the size of the first ring. Of course i forgot to fix it when i implemented the correct idea. Another small mistake was that i didn't update the result when the solution consisted of only 1 ring. Thanks Picsel for this. But still the positive thing is that my sort was correct:D yeeeey.
just remember: if you are sorting the rings, and if you need to search for the rings, DON'T use linear search.. Use some kind of modified binary search.. I was using linear search and getting TLE.. After modifing to binary search I got full score...