ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1715. Another Ball Killer

Crash (stack overflow) 1 O_O
Послано Tbilisi SU: Gio (Away) 11 окт 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
Послано :| 11 окт 2009 16:58
I think you shouldn't post whole code here.
Re: Crash (stack overflow) 1 O_O
Послано Tbilisi SU: Gio (Away) 11 окт 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
Послано Tbilisi SU: Gio (Away) 13 окт 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
Послано :| 13 окт 2009 18:33
You should study Timus C++ compiler better or write compiler-independent codes ;)

Edited by author 13.10.2009 18:36
-
Послано :| 13 окт 2009 18:35
...

Edited by author 13.10.2009 18:36
-
Послано :| 13 окт 2009 18:35
...


Edited by author 13.10.2009 18:36
Re: Crash (stack overflow) 1 O_O
Послано :| 13 окт 2009 18:35
...

Edited by author 13.10.2009 18:35
Re: Crash (stack overflow) 1 O_O
Послано Tbilisi SU: Gio (Away) 13 окт 2009 18:49
:| писал(a) 13 октября 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