10756 - HardNumbers

All about problems in Volume 107. 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
Krzysztof Duleba
Guru
Posts: 584
Joined: Thu Jun 19, 2003 3:48 am
Location: Sanok, Poland
Contact:

10756 - HardNumbers

Post by Krzysztof Duleba »

I'm not sure how should I unserstand the operations. What is the right output for the following input?
6

123
123
pxj

123
13
pxj

123
21
pxj

123
31
pxj

123
231
pxj

1
0
pxj
Are there any other special cases that I should handle?
Dyatlov
New poster
Posts: 6
Joined: Thu Sep 02, 2004 10:40 am
Location: Novosibirsk, Russia
Contact:

Post by Dyatlov »

You should read the input and output description carefully. Everything is said there.
Semyon Dyatlov
Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel »

The output for your test cases is obviously:
123

13

21

31

231

Impossible

But here is a tricky test case:
00
0
j

output should be: 00
Krzysztof Duleba
Guru
Posts: 584
Joined: Thu Jun 19, 2003 3:48 am
Location: Sanok, Poland
Contact:

Post by Krzysztof Duleba »

Dyatlov - it wasn't clear to me that operations can be joined in any order.

Thank you Adrian for a great case. What about this one:
02001
21
j
Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel »

I guess you wanted to see the answer for this case (the answer for your case is impossible):
02001
21
jx
my output is:
21
Krzysztof Duleba
Guru
Posts: 584
Joined: Thu Jun 19, 2003 3:48 am
Location: Sanok, Poland
Contact:

Post by Krzysztof Duleba »

No, that's exactly what I wanted to know. I thought that 0, 0, 1 can be joined together into expression equal to 1 and then with 2 into 21 and then with 0. Thanks.
Krzysztof Duleba
Guru
Posts: 584
Joined: Thu Jun 19, 2003 3:48 am
Location: Sanok, Poland
Contact:

Post by Krzysztof Duleba »

Just got AC. Thanks for your help.
Post Reply

Return to “Volume 107 (10700-10799)”