hello,
i need some critical i/o for this problem.
can anyone help me??
thanks in advance.
sreejon
cuet,06
11484 - Document Object Model
Moderator: Board moderators
Re: 11484 - Document Object Model
Try this one:
Correct output is:
Code: Select all
6
<n value='parent'>
<n value='child'>
</n>
<n value='me'>
</n>
</n>
8
parent
parent
first_child
next_sibling
previous_sibling
previous_sibling
next_sibling
first_child
12
<n value='a'>
<n value='b'>
</n>
<n value='c'>
</n>
<n value='d'>
</n>
<n value='e'>
<n value='f'>
</n>
</n>
</n>
32
next_sibling
previous_sibling
first_child
parent
parent
first_child
next_sibling
next_sibling
next_sibling
next_sibling
next_sibling
next_sibling
next_sibling
next_sibling
next_sibling
next_sibling
first_child
previous_sibling
parent
parent
first_child
next_sibling
next_sibling
next_sibling
next_sibling
next_sibling
previous_sibling
next_sibling
first_child
previous_sibling
parent
parent
4
<n value='parent'>
<n value='child'>
</n>
</n>
6
next_sibling
first_child
first_child
parent
parent
parent
0
Code: Select all
Case 1:
parent
parent
child
me
child
child
me
me
Case 2:
a
a
b
a
a
b
c
d
e
e
e
e
e
e
e
e
f
f
e
a
b
c
d
e
e
e
d
e
f
f
e
a
Case 3:
parent
child
child
parent
parent
parent
Runtime errors in Pascal are reported as Wrong Answers by the online judge. Be careful.
Are you dreaming right now?
http://www.dreamviews.com
Are you dreaming right now?
http://www.dreamviews.com
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 11484 - Document Object Model
The sample input is wrong.
It should be:
It should be:
Code: Select all
4
<n value='parent'>
<n value='child'>
</n>
</n>
2
next_sibling
first_child
0
Check input and AC output for thousands of problems on uDebug!