712 - S-Trees

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

Moderator: Board moderators

Post Reply
Donotalo
Learning poster
Posts: 56
Joined: Sat Aug 20, 2005 11:05 am
Location: Bangladesh

712 - S-Trees

Post by Donotalo »

for the following input:

Code: Select all

3
x1 x2 x3
00000111
4
000
010
111
110
3
x3 x1 x2
00010011
4
000
010
111
110
0
both of the following outputs result PE:

Output 1

Code: Select all

S-Tree #1:
0011

S-Tree #2:
0011
Output 2

Code: Select all

S-Tree #1:
0011

S-Tree #2:
0011

why? please give suggestions on how to fix it!
Image
Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Post by Jan »

The problem states...
Output a blank line after each test case.
So output 2 is correct. And I can't think of any critical case.
Ami ekhono shopno dekhi...
HomePage
Donotalo
Learning poster
Posts: 56
Joined: Sat Aug 20, 2005 11:05 am
Location: Bangladesh

Post by Donotalo »

yes, i think so. output 2 should be correct. but after i got PE in output 2, i tried output 1 and also got PE. that's why i asked for help here, and wondering what's my mistake! :roll:
Image
DD
Experienced poster
Posts: 145
Joined: Thu Aug 14, 2003 8:42 am
Location: Mountain View, California
Contact:

Re:

Post by DD »

Donotalo wrote:yes, i think so. output 2 should be correct. but after i got PE in output 2, i tried output 1 and also got PE. that's why i asked for help here, and wondering what's my mistake! :roll:
From my A.C. output, I also thought the output2 is the correct output formmat, or you can paste your codes and let us examine it.
Have you ever...
  • Wanted to work at best companies?
  • Struggled with interview problems that could be solved in 15 minutes?
  • Wished you could study real-world problems?
If so, you need to read Elements of Programming Interviews.
Post Reply

Return to “Volume 7 (700-799)”