## 11474 - Dying Tree

All about problems in Volume 114. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Samiul
New poster
Posts: 36
Joined: Thu Dec 13, 2007 3:01 pm

### 11474 - Dying Tree

Can anyybody help me on this problem? I have no idea why I am getting WA.

Code: Select all

``````removed
``````
Last edited by Samiul on Tue Aug 05, 2008 1:33 pm, edited 1 time in total.

asmaamagdi
New poster
Posts: 27
Joined: Tue Dec 20, 2005 9:14 am
Location: Egypt

### Re: 11474 - Dying Tree

You should set edge to 0. Your code fails when the first tree (only) can talk to a doctor.
---
Asmaa Magdi

Samiul
New poster
Posts: 36
Joined: Thu Dec 13, 2007 3:01 pm

### Re: 11474 - Dying Tree

Thanks a lot.

vahid sanei
Learning poster
Posts: 84
Joined: Fri Jan 09, 2009 4:37 pm
Location: IRAN

### Re: 11474 - Dying Tree

i got WA
and i changed this

Code: Select all

``````struct node{
char kind;
[b]double[/b] xx,yy;
int index;
};``````
to

Code: Select all

``````struct node{
char kind;
int xx,yy;
int index;
};``````
and I got Acc I dont know ,Why !
(maybe for reading inputs
if xx=3 , so for double xx is 2.99999999)
and i have another problem
problem says :
0 < n < 100, 0 < m ? 10, 0 ? k, d ? 100
and 0 < b < 10
so we have 10*10(trees) + 100 (number of doctor) = 200 nodes
but i got runtime error with list[300];
and i think picture isn`t exactly answer
this`s better : (Click on pic)

Impossible says I`m possible

calicratis19
Learning poster
Posts: 76
Joined: Mon Jul 21, 2008 8:50 am
Location: SUST,SYLHET,BANGLADESH.
Contact:

### 11474 - Dying Tree_wa

AC
Last edited by calicratis19 on Fri Mar 26, 2010 8:21 pm, edited 2 times in total.
Heal The World

Scarecrow
Learning poster
Posts: 69
Joined: Wed Oct 19, 2011 9:06 pm

### Re: 11474 - Dying Tree

i can't find what's wrong with my code as i'm getting WA for this problem. can any1 help plz?

Code: Select all

``````AC
``````
Last edited by Scarecrow on Fri Apr 20, 2012 11:27 pm, edited 1 time in total.
Do or do not. There is no try.

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 11474 - Dying Tree

Your code fails on this input:

Code: Select all

``````1
1 1 0 1
0 0
2
1 0 2 0``````
AC Output:

Code: Select all

``Tree can be saved :)``
Check input and AC output for thousands of problems on uDebug!

Scarecrow
Learning poster
Posts: 69
Joined: Wed Oct 19, 2011 9:06 pm

### Re: 11474 - Dying Tree

thnx made a silly mistake
Do or do not. There is no try.