ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1715. Another Ball Killer

Crash (stack overflow) 1 O_O
Posted by Tbilisi SU: Gio (Away) 11 Oct 2009 13:15
I wrote solution, it works well on my PC, but gives stack overflow 1 on Online judge, first test is example from problem statement, I've no idea, on Visual c++ 2008 my solution does not give any error, please help if you know whats up with Compiler on Timus...

---
CODE DELETED

Edited by author 13.10.2009 18:32
Re: Crash (stack overflow) 1 O_O
Posted by :| 11 Oct 2009 16:58
I think you shouldn't post whole code here.
Re: Crash (stack overflow) 1 O_O
Posted by Tbilisi SU: Gio (Away) 11 Oct 2009 23:39
I dont think so )
anyway It is not an AC code and I can put it here.

I'll delete code when I will get AC



Edited by author 11.10.2009 23:44
Re: Crash (stack overflow) 1 O_O
Posted by Tbilisi SU: Gio (Away) 13 Oct 2009 18:31
found mistake at last :| AC now

sz[++nom] = dfs(i , j , nom);

this fragment changed to:

nom++
sz[nom] = dfs(i , j , nom);

do you see any difference? timus compiler sees :)
Re: Crash (stack overflow) 1 O_O
Posted by :| 13 Oct 2009 18:33
You should study Timus C++ compiler better or write compiler-independent codes ;)

Edited by author 13.10.2009 18:36
-
Posted by :| 13 Oct 2009 18:35
...

Edited by author 13.10.2009 18:36
-
Posted by :| 13 Oct 2009 18:35
...


Edited by author 13.10.2009 18:36
Re: Crash (stack overflow) 1 O_O
Posted by :| 13 Oct 2009 18:35
...

Edited by author 13.10.2009 18:35
Re: Crash (stack overflow) 1 O_O
Posted by Tbilisi SU: Gio (Away) 13 Oct 2009 18:49
:| wrote 13 October 2009 18:33
You should study Timus C++ compiler better or write compiler-independent codes ;)

Edited by author 13.10.2009 18:36

I studied that ++x increases x, before making operations on it :)

PS. why all the strange things happens with me? :( I lost 1 year of my life debugging my code... :S