hunterr_196's blog

By hunterr_196, history, 5 years ago, In English

Please help me in understanding this that why my code is giving TLE although it giving output in 0.1 sec and my loop is running to 10^5 maximum. 10^5 is good enough for clearing in 1 sec if i am wrong then pls tell me. The problem was taken from latest codechef contest named FALL FOR CODE 2.0

QUESTION LINK :- click for question ANSWER Link:- click for answer

I checked my answer on CODEFORCE, HACKEREARTH AND CODECHEF online ide and all of them showing 0.1 sec execution time. EVEN i cross checked my answer with the correct submission made by others and put this testcase on both of the code(mine and the correctly submitted one) and it was wonder for me my code executed in 0.11 sec and his code executed in 0.14 sec STILL FOR MY CODE IT WAS SHOWING TLE.

Please help me out to understand this. A VERY BIG THANKS IN ADVANCE.

Full text and comments »

  • Vote: I like it
  • -13
  • Vote: I do not like it

By hunterr_196, history, 6 years ago, In English

Can anyone please help me with this Codechef August Long Challenge 2018 problem QUESTION why my solution is giving Wrong Answer and for which test case it is failing and why..... solution link Solution It will be a great help for me....thank you.

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it

By hunterr_196, history, 6 years ago, In English

Here is the problem QUESTION. My approach :- I am taking the Nth root of the given no X and then storing the Nth power of that numbers in an array.

for ex :- x = 100, n = 3 then nth root is 4 and now storing Nth power 1,8,27,64 into an array. Now the main part comes where i am choked. I am unable to write down the code for counting that how many pair of numbers when added give me the number X. specially without using recursion and also didn't get the solution given in the above question link.

Can anyone please help me out through this by explaining that what is the actual concept I have to apply to solve this kind of problems. If possible please explain without using recursion and by using my approach if it is an efficient way to solve this problem. Thank you.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By hunterr_196, history, 6 years ago, In English

question link :- ques i am only able to pass 1st subtask (30 points) of this question. I am following the simple logic for this problem. can anyone please help me and explain me how i can think of that solution which completely pass the subtask as well as how i can think in that particular direction whenever in future i face the question like this. I mean that thinking of that solution which gives me 100 points AC. my solution for 30 points solution

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By hunterr_196, history, 6 years ago, In English

This is the ques from codechef for which i am getting TLE QUES and this is the link of my solution codesolution Please can anyone help me to understand why my approach is getting TLE all the time even though i am only performing the mathematical operations only. It would be a great help for me.

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By hunterr_196, history, 6 years ago, In English

Again its the Codeforces(cf) who nailed it. The contest conducted by cf are very frequent and really its a very good thing. I am almost there on every competitive programming site and found that cf is the best in conducting the contest. Thankful to all those guys who put there efforts in organizing this contests for us. It took a lot of effort to come up with a new question every time and gives us the opportunity to solve them. Once again thanks to all you guys.

Full text and comments »

  • Vote: I like it
  • +39
  • Vote: I do not like it

By hunterr_196, history, 6 years ago, In English

Codeforces are doing well in developing a no. of quality coders. As i joined codeforces(cf) very early but start participating in the contests now and what i found is that the way of hosting the contest and offcourse the hacking and System Testing process i liked much.Yeah..the questions are always tricky and short if u go in the right direction that's the most important thing attracted me. So thank you cf for providing such a platform to us.

Full text and comments »

  • Vote: I like it
  • +36
  • Vote: I do not like it