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

Обсуждение задачи 1553. Caves and Tunnels

Night Stack Overflow [3] // Задача 1553. Caves and Tunnels 2 ноя 2011 04:25
Please I got Crash(Stack Overflow), I implemented my first heavy-light descomposition and tried this problem, but I got this.

I got AC, I had to  convert the DFS to BFS, to evade the StackOverflow.

Edited by author 02.11.2011 04:45

Edited by author 02.11.2011 07:20

Edited by author 02.11.2011 08:20
cxjyxx_me Re: Stack Overflow // Задача 1553. Caves and Tunnels 28 апр 2012 06:55
{$m 100000000000000000000}
rumazius Re: Stack Overflow [1] // Задача 1553. Caves and Tunnels 17 июн 2021 20:27
You can use "G++ 9.2 x64" language to avoid it
Solver Re: Stack Overflow // Задача 1553. Caves and Tunnels 4 июн 2026 11:33
You can also use
#pragma comment(linker, "/STACK:16777216)
for MSVC

and both heavy-light or sqrt decompositions can be performed with BFS, so no recursion needed