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

Обсуждение задачи 1018. Двоичная яблоня

Показать все сообщения Спрятать все сообщения

If you got WA Ilya Mitin 12 май 2008 19:49
0) AC solve is DP on tree.
1) In DP inf = 1e9.
2) All test in the forum:

5 5
3 1 1
4 1 10
2 3 20
3 5 20
ans = 21

7 4
1 2 10
1 3 20
2 4 30
2 5 0
3 6 0
3 7 40
ans = 100

4 1
1 2 1
1 3 2
2 4 3
ans = 2

5 1
1 2 1
1 5 0
2 3 0
2 4 0
ans = 1

7 3
1 2 1
1 3 39
2 4 40
2 5 40
3 6 39
3 7 39
ans = 117

5 2
1 3 1
1 4 10
2 3 20
3 5 20
ans = 21

Edited by author 12.05.2008 19:54
Re: If you got WA Ai.Freedom 25 июн 2008 00:42
thanks a lot for your test cases!
Re: If you got WA Aoki 23 фев 2018 06:15
thanks!
Re: If you got WA sanok 15 дек 2008 02:15
Thank you for test data. I suppose there is typo in case #1. Correct answer must be 51.
Re: If you got WA Hakkinen 26 янв 2009 18:41
kiitos!
I got AC
Re: If you got WA tcet 12 мар 2012 22:19
哈哈
Re: If you got WA evjava 24 окт 2009 19:59
Why in the first example ans=21? I think it  must be 51.
Re: If you got WA Oleg Strekalovsky [Vologda SPU] 31 дек 2010 20:25
evjava писал(a) 24 октября 2009 19:59
Why in the first example ans=21? I think it  must be 51.
First test is incorrect. Q must be <=N-1.
Re: If you got WA Anton 9 апр 2011 18:27
Big thanks!
Re: If you got WA Mato_No1 25 июл 2010 15:38
I could AC all your tests, but I still got WA.
Re: If you got WA bojan 14 окт 2011 06:15
THX
Re: If you got WA BaJIuK 3 ноя 2011 02:25
My falt was that my inf was too litlle ^^ thx a lot!
Re: If you got WA EZ_YE88ZI 3 дек 2011 06:43
哈哈
Re: If you got WA EZ_YE88ZI 3 дек 2011 06:43
吃高高
Re: If you got WA EZ_YE88ZI 3 дек 2011 06:44
吃JB
Re: If you got WA ez_wyc 3 дек 2011 06:44
吃粪汁啦 第一组和第三组数据吃粪一样的。。。第一组很明显不可能啦 第三组这叫一个苹果“二叉”树
Re: If you got WA EZ_YE88ZI 3 дек 2011 06:44
什么是粪汁?
Re: If you got WA EZ_YE88ZI 3 дек 2011 06:45
粪汁是不是一种汁
Re: If you got WA EZ_YE88ZI 3 дек 2011 06:45

Edited by author 03.12.2011 06:51

Edited by author 03.12.2011 06:51
Re: If you got WA AndreyPikas [Yaroslavl SU] 4 дек 2011 16:23
3-rd test case is incorrect, because "any biparous branch splits up to exactly two new branches"
Re: If you got WA vlyubin 29 мар 2012 09:45
Remember that the tree should always be a tree (you can't split it into several components)...
Re: If you got WA iOli 23 окт 2017 16:50
Thank you very much.
Re: If you got WA capitan.ARA.code 7 авг 2020 13:08
are you sure i think 5 5 mean we must have all vertex ans ans is 51
5 5
3 1 1
4 1 10
2 3 20
3 5 20
ans = 51