Otherwise your "interesting" problem (hint, it isn't) is just a lame attempt to cheat an online competition, by getting others to do all the work for free.
I volunteer my time and very limited knowledge for free to help people who actually put in an effort.
more like a math problem than a algorithm
what is the difference?
you solve math problems with …. algorithms!
Hint: what is that inequality? Plot it if you can't figure it out. (I don't know at a glance but I see possibly a conic sections problem, or a trig identity one. sin^2+cos^2 = something, …)
If you don't know how to code anything, even a simple program for taking input from a user or printing out a message, maybe it is time to go back to school and learn.
You vomit up a complicated problem from a programming contest and then expect others to hold your hand and do ALL the work for you.
Programming contests require the entrants to WRITE CODE. The contests are to test the coding ability of an individual, their knowledge of the language and the problem's logic.