# 2nd question is tough

cook off 2nd question real obtuse is tough , bit it has so submission , i am new , i want to become good how to do ?

1 Like
1 Like

Hi Aniket,

If you want to become good the only mantra is practice. While practicing you have to keep in mind how to start, According to me, if you are new you have to start with beginner, solve questions from below first try to solve by yourself then see editorials once you think you’ve done a lot from below start from top if you are able to solve them go to easy and repeat till hard, each step is important. While participating in contest either you are able to solve problems or not, always go through editorials, they have solution of author’s and tester’s, many time you get new way of solving problem which you already solved and learn something new, for problem which you are not able to solve you have to read editorial try to code it by own and then see author’s solution, it is good way of doing practice and participating both. It always take you ONE LEVEL UP.

Hope this helps!

Cheers,
Priya

2 Likes

Its understandable if this question got you. The question itself isnt tough, its just that its cleverly masked.

What the Q ultimately reduces to, is, you need to find minimum candles between A and B (and print 0 if AB is diameter, or if candles in both paths are same).

But how to reduce it to this? How to verify that its the correct solution?

There is a high school theorem which says that, “If a chord divides a circle into 2 parts, then all angles made by chord in SMALLER part are obtuse, and all angles made by it in larger part are acute”. Question becomes now, how many angles can be formed in smaller part? Its equal to number of candles in smaller part (excluding A and B, of course!)

If this theorem isnt known, then you need some practice to develop your “intuition” to find your way through it. Once we see through the question, its not that hard.

1 Like

You can check this link, where I have tried my best to explain.

Hope you find something useful there.

I think this problem uses these properties of circle:

An inscribed angle a° is half of the central angle 2a°

And keeping the endpoints fixed, the angle a° is always the same, no matter where it is on the circumference:

2 Likes

thank you , I wanted to up vote but cannot

I am going through it , can you explain more

NO PROBLEM.

You can always “accept” answer to give her karma. Just click on the “tick-inside-circle” button just below the upvote/downvote buttons

see its simple , the points if are diameter then 0 will be answer , and only if n is even they will have diameters , else between A and B on both sides whichever is min , will be the answer since the min side gives obtuse angles , and the max gives acute angles. if 7 and a is 3 and b is 5 then [4] and [6,1,2] so the candle on 4 will make obtuse any more explanations needed.?

2 Likes

yes I got it , @raj79 example made it clear . I was confused with the odd part and 0

I was just wondering… Why and how are you bothering about it so much? You have not even participated in any contest yet… -_- Is it fake account thing again? Donot take me in wrongs sense… I am just asking…

thank you , the image made it more clear

fake account ? what are you talking ?