ryoko1's blog

By ryoko1, 4 weeks ago, In English,

Here is the link for the problem:(http://www.spoj.com/problems/HISTOGRA/) Here is my solution:(http://ideone.com/6SkfuH). The code is giving wrong output for the example mentioned in the solution link.The right answer for that test case is 283960245. I tried to debug my code and I think that the stack is not popping the value at i=2.I maybe wrong here,I am just not sure.Your help will be appreciated.

Read more »

 
 
 
 

By ryoko1, history, 5 weeks ago, In English,

the problem tag is: 796B - Find The Bone Here is my sol: 26520634. Another query is that in the above submission when I change my array size from (n+1) to max the OJ gives me TLE on 5th test case. Why is it so? According to my knowledge array creation is a O(1) process and should not affect the time complexity of the program by any means. Your help will be appreciated!!!

Read more »

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

By ryoko1, history, 6 weeks ago, In English,

Here is my code: 26360123`

I am getting the output as : Runtime error: exit code is -1073741819 Your help will be appreciated!!

Read more »

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