Competitive Programming - Dilemma in Demon's House

Prajwalpandey
4 min readJun 21, 2021

Many of your peers told the twist to train your Trinity (Environment, Envy, and Enthusiasm).

But competitive programming is not an easy asset to hold on to. But there is a way to serve this asset to our exile extensions of execution.

All of us have that one peer that helps us to make that prison of programming, a Patriot of programming. You have that dedication from decades. You only need a recursive function that will call your destiny based on the dedication, that you have done to make your Dream your Destiny

Let me have my liberty to inaugurated that PEER in front of you all.

The peer with the power to penetrate your pit (i.e. exhuated skull) is your Subconscious Mind.

You only need a Reserved recursive function to make a recursive call to your built-in Data Structures & Algorithms (your mind) to move the sharped blade back & forth as to provide a sharp edge to your code, that ultimately makes you stand beneath MNCs.

We all know what peer coding is all about. But I am adding some practical proposition to your code spinnet. And this proposition will terminate your boogies bugs, that is on top of the queue (But, certainly this FIFO traverse like LIFO i.e. stack of sophistication). Wondering, why I use it certainly because the compiler will always execute its monarchial compilation

This is what we called stress explosion.

Many of your mentors must have told you to replicate competitive programming in your real life. Apply the same Algorithm that you applied while solving that contest problem.

But, we barely apply these Tactics in our Truce. Once you have that inner instinct to lionize your environment. Here you got the crate of caffeine that will make your Central Nervous System Normalize the nested Nuts (bugs of your program). Ultimately you will have a fallacy-free code in your corner.

Let me give you an IDE(Impromptu Definite Environment) With the help of an example.

I will try to make a CP question on my own.

There is a villa which has 2 CCTV Cameras in their main exit. And those cameras scan the height of all the people that comes under their surveillance and store their heights in an array. (Array takes float value as Input i.e. 5.6, 6.2, 5.7, etc )

How CCTV will scan the heights of the person who take the exit from the exit point: these CCTV’s has a sensor extension device that will scan the height of the persons by generating an outline of that person.

The height of all the member of this villa is a minimum of 6 feet (they have that kind of gene in their blood)

So the cameras consider above 6 feet height as a normal person and below 6 feet height as a Dwarf person. And store these heights in an array.

But there is a pair of notorious twins in this family (they have the same height), and if the camera caught them in surveillance, they will alert the guards (twins will try to get to the exit point at the same time).

Now you have to print the absolute difference between the heights of dwarf persons and tall persons.

And if the camera caught the notorious twins, then you have to print

“Hold these naughty nuts.”

Constraints of this Problem : (4.0≥height<7.0), (5≥No. of People<100)

Sample Input: No. of persons:- 5 || Height of Person :- 5.5 ,5.4 ,6.2,6.2,4.5

Sample Output : 3 || Hold these Naughty Nuts

Explanation: The sum of Heights of the person below 6 feet is (5.5+5.4+4.5 = 15.4) and The sum of Heights of the person above6 feet is (6.2+6.2 = 12.4), finally the absolute difference between the height is (|15.4–12.4| = 3 feet). And there are two persons of the same height and hence they are the notorious twins, that’s why we have to print “Hold these naughty Nuts”,

Now you can make your own optimal logic for this impromptu problem. And you can also add some more conditions to make this problem more tricky. In this way, you can make your own questions and it will encourage you to do more complex questions by applying different algorithms. You can also make CP Questions based on Memes and share them with your peers. In this way, your fussy frustration will be converted into flaming fascination.

At last, I will be giving you a quote to Quest your Conundrum.

Make your logic-building capability sharp as katana.

Consistency doesn’t mean peddling a rusted chain cycle, instead, you can lubricate your chain, and then peddle your BMX with pace.

--

--