StackOverflow error but AC in Codeforces

Правка en1, от Sandip_Jana, 2016-10-12 16:50:37

Problem C : Mr. Kitayuta, the Treasure Hunter

I was trying to solve this Problem on codeforces but when i was trying to solve it in my laptop it gave me StackOverflow error even for small inputs.

I wrote the code in Sublime Text and run it using command prompt

I tried running the same code on Eclipse IDE but in vain . Got the same StackOverflowError error.

I checked other people's AC codes and found that logic was same . So i tried submitting the code on codeforces and to my surprise it got AC.

21278829

Do i need to create a thread and initialize something or something is wrong with the memory. I am unable to figure out the mistake why the program is not executing successfully in my laptop. If someone knows what might be the appropriate solution it would be helpful...!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Sandip_Jana 2016-10-12 16:52:57 35 (published)
en2 Английский Sandip_Jana 2016-10-12 16:51:25 64 Tiny change: 't\n\n![ ](http://mirror.codeforces.com/77fdbc/troll.png)\n\nI tri' -> 't\n\n![ ]()\n\nI tri'
en1 Английский Sandip_Jana 2016-10-12 16:50:37 1063 Initial revision (saved to drafts)