sourabh_jangid's blog

By sourabh_jangid, history, 2 months ago, In English,

I was solving 691E - Xor-sequences, and in the problem asked to find number of ones in binary representation of a number, I was using C++ STL __builtin_popcount() function to find Number of ones, but when I submitted I got wrong answer verdict, and then I wrote my own function to count Number of ones and then my solution passed. Can anyone explain to me why this is happening? My AC 69283580 code and WA 69283537 code.

Read more »

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

By sourabh_jangid, history, 7 months ago, In English,

I am trying to solve 611D - New Year and Ancient Prophecy, I wrote 60357814 this solution. I think the Time Complexity of my solution is $$$O(n ^ 2\log{}n)$$$ but I am getting Time Limit Exceeded verdict. I want to know is my Time Complexity analysis is wrong because I saw many $$$O(n ^ 2\log{}n)$$$ solutions are accepted(like 15127310) but not mine.

Read more »

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

By sourabh_jangid, history, 8 months ago, In English,

I was trying to solve this problem (56E - Domino Principle). I am stuck on Test Case 30.(Link to my submission 58845497). I tried for hours but not been able to find my mistake. My algorithm is same as the editorial given, but it is giving wrong answer verdict on test case 30. Please help me in debugging the code, and also share some debugging technique, what you use during a contest.

Read more »

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