10403 - Escape from Tut's Tomb

All about problems in Volume 104. 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
makbet
New poster
Posts: 44
Joined: Tue Nov 26, 2002 11:01 pm
Location: Wejherowo

10403 - Escape from Tut's Tomb

Post by makbet »

does ac=b mean a+c=b
if so, why isn't
a=1
b=2
c=1
the correct anwser for the
sample input:
3 5
ac=b
ac=b //does repeating have any effect?
bc>a
ac=b
c<ab
:o

Robbie
New poster
Posts: 15
Joined: Wed Aug 07, 2002 11:38 am
Location: Viet Nam

Re: 10403: sample input

Post by Robbie »

Yes , I think ac=b means a+c=b
But n gold sphinxes have distinct interger weights 1..n. So the correct answer here is : 1 3 2

This problem seems so tricky . Could anyone give me a hint ?
thanx
GGG

dwyak
New poster
Posts: 36
Joined: Sun Jul 28, 2002 5:16 am
Location: P.R.China
Contact:

Post by dwyak »

can your program deal with this case?

1 1
A >

this makes me WA in the contest.

Pasq
New poster
Posts: 5
Joined: Mon Jun 24, 2002 5:53 pm

Post by Pasq »

And wlt should be the output ???

przygoda
New poster
Posts: 7
Joined: Fri Aug 09, 2002 12:26 pm
Location: Poland

Post by przygoda »

it is possible to use capital letters ???
Please help me

Per
A great helper
Posts: 429
Joined: Fri Nov 29, 2002 11:27 pm
Location: Sweden

10403 Escape from Tut's Tomb I/O

Post by Per »

I'm getting WA. Could anyone check these inputs please?

Code: Select all

1 1
a <
1 1
a >
2 1
< a b
2 1
a = b
2 1
a > b
24 1
o b v k p h t s f e w u j q n x < m d g i a c r l 
24 2
r j l i x s o f g e p v = u n c a q t b h k m w d
o b v k p h t s f e w u j q n x < m d g i a c r l 
19 3
n s i k o q r g h m p d j > b l e c a f 
s j f l a n g k q b m c i > o d e h r p 
m e b j s l h p f r q n g < c i k o a d 
19 4
n s i k o q r g h m p d j > b l e c a f 
s j f l a n g k q b m c i > o d e h r p 
m e b j s l h p f r q n g < c i k o a d 
q a n c s m k p r h l g d < b f e i o j
My output is:

Code: Select all

No solution possible!
Solution: 1
Solution: 1 2
No solution possible!
Solution: 2 1
Solution: 4 1 18 19 2 3 20 5 21 6 7 22 23 8 9 10 11 24 12 13 14 15 16 17
Solution: 4 1 18 19 2 3 20 5 21 6 7 22 23 11 8 9 14 24 10 15 16 12 17 13
Solution: 11 1 15 16 2 3 4 5 17 6 18 7 8 9 19 10 12 13 14
No solution possible!

Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel »

I get the same answer on your test cases.
What about:
1 1
a =
2 1
a = b
3 1
a b = c
4 1
a b = c d
5 1
a b c = d e
6 1
a b c = d e f
7 1
a b c d = e f g
8 1
a b c d = e f g h
Output should be:
No solution possible!
No solution possible!
Solution: 1 2 3
Solution: 1 4 2 3
No solution possible!
No solution possible!
Solution: 1 2 4 7 3 5 6
Solution: 1 2 7 8 3 4 5 6

Per
A great helper
Posts: 429
Joined: Fri Nov 29, 2002 11:27 pm
Location: Sweden

Post by Per »

Thanks. I handled those cases correctly, but I found my mistake: I had made the really stupid assumption that there could never be two different equalities!

I.e. I failed to handle cases such as:

Code: Select all

8 2
a b c d = e f g h
e f c d = a b g h
where the answer is

Code: Select all

Solution: 1 4 5 8 2 3 6 7

shanto86
Experienced poster
Posts: 160
Joined: Wed Jul 30, 2003 8:10 pm

Post by shanto86 »

hint plz
Self judging is the best judging!

Post Reply

Return to “Volume 104 (10400-10499)”