NTHCIR - Editorial

Hey,
Was the formula for the 2nd subtask also available in google search? I hope not.

Every problem has a pre-requisite. If you know the concept of inversion, then you can solve this problem from scratch without using google.

2 Likes

Could you please provide a link to image or any thing related to how you found out the solution to the recurrence. I am stuck at some stepsā€¦or any strategy that i should try.

By ā€œformula for 2nd subtaskā€ you mean ā€œsum of arithmetic progressionā€? :slight_smile:

No.
In the first approach, the closed form of the nth term of recurrence. I find it harder than just a simple AP :P.
If you mean in inversion, then, yes, it is nā€™th term of an AP, but I feel it is very tricky to choose the correct origin. :slight_smile: