10344 - 23 out of 5

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

Moderator: Board moderators

CodeMaker
Experienced poster
Posts: 183
Joined: Thu Nov 11, 2004 12:35 pm
Location: AIUB, Bangladesh

Post by CodeMaker »

HI, can anyone explain why this case (x * -y) is valid?
I think there should be only one operator between two values.

my Acc code get WA for this new entry in test data. :x

thanks.
Jalal : AIUB SPARKS
Chok
New poster
Posts: 48
Joined: Mon Jun 27, 2005 4:18 pm
Location: Hong Kong

Post by Chok »

Hi Jalal,
Can you tell my error. What i miss??? Thankx in advance.
CodeMaker
Experienced poster
Posts: 183
Joined: Thu Nov 11, 2004 12:35 pm
Location: AIUB, Bangladesh

Post by CodeMaker »

Hi, here is ur modified Acc code. I have changed a few things. so if I write it will be long, better u compare with ur previous code.
Last edited by CodeMaker on Sun Sep 04, 2005 2:55 pm, edited 1 time in total.
Jalal : AIUB SPARKS
I LIKE GN
Learning poster
Posts: 57
Joined: Fri Oct 10, 2003 11:01 pm
Location: in front of PC
Contact:

WAAAAAAAAA

Post by I LIKE GN »

hello here is my WA soln
my approach is ...
generate all permutations and then check for Validity for each permutation

Code: Select all

removed...
 thanks
Last edited by I LIKE GN on Tue Sep 06, 2005 7:44 pm, edited 1 time in total.
There are two tragedies in life one is to lose your hearts' desire and another is to gain it --- GBS.
Chok
New poster
Posts: 48
Joined: Mon Jun 27, 2005 4:18 pm
Location: Hong Kong

Post by Chok »

Hi Jalal,
Thankx for ur help. Now i understand my mistake. Thanx again.
CodeMaker
Experienced poster
Posts: 183
Joined: Thu Nov 11, 2004 12:35 pm
Location: AIUB, Bangladesh

Post by CodeMaker »

Hi, like everyone u have done the same mistake......

here is ur Acc code;

Code: Select all

Removed
Last edited by CodeMaker on Sun Sep 11, 2005 7:14 pm, edited 1 time in total.
Jalal : AIUB SPARKS
I LIKE GN
Learning poster
Posts: 57
Joined: Fri Oct 10, 2003 11:01 pm
Location: in front of PC
Contact:

Hello !!!!!!!!!!!!!!!!

Post by I LIKE GN »

Hello CodeMaker
many many thanks at first to help me :lol: :lol: :lol:
well i mistakenly added DIVISION operation
but i have the same ques. as urs( i didn't read it before my previous posting here )
CodeMaker wrote:HI, can anyone explain why this case (x * -y) is valid?
I think there should be only one operator between two values.

my Acc code get WA for this new entry in test data. :x

thanks.
so please any one clearify the reason...
thanks to UUUUUUU all
sepcial thanks to CodeMaker AGAIN!!!!!!!!!!
RSS
There are two tragedies in life one is to lose your hearts' desire and another is to gain it --- GBS.
mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf »

HI, can anyone explain why this case (x * -y) is valid?
I don't think it's valid. I suspect that when they recently changed judge's input for this program, they've used some incorrect solution to produce the output file.
I got my old program accepted again by printing "Possible" if it's possible to find expression that yields either +23 or -23.
Rocky
Experienced poster
Posts: 124
Joined: Thu Oct 14, 2004 9:05 am

10344 - WA...WHY..

Post by Rocky »

Hi everybody
I get wa for the problem 10344.I consider all the combination of +,-,*.
i dont know wht i get wa...Any Help or critical test data..??plzzzzz..

Thank's In Advance
Rocky
mamun
A great helper
Posts: 286
Joined: Mon Oct 03, 2005 1:54 pm
Location: Bangladesh
Contact:

Post by mamun »

Did you see other posts? Here is one
Input

Code: Select all

11 12 11 12 3
Output

Code: Select all

Impossible
Rocky
Experienced poster
Posts: 124
Joined: Thu Oct 14, 2004 9:05 am

Post by Rocky »

i got the same output as you get....and WA...any more I/O...
but i read from other thread that some one says that the expression can be (x*-y) is it valid......?? My programme not support it...

Thank's in Advance
Rocky
Rocky
Experienced poster
Posts: 124
Joined: Thu Oct 14, 2004 9:05 am

acc

Post by Rocky »

Yes Got Acc using the condition (x*-y).....
but why it is valid because the number will be positive...

Thank's for Reply
Rocky
mamun
A great helper
Posts: 286
Joined: Mon Oct 03, 2005 1:54 pm
Location: Bangladesh
Contact:

Post by mamun »

Numbers will be positive. But somebody said 23 and -23 both should be correct which is actually the same, just altering the + and -.
Rocky
Experienced poster
Posts: 124
Joined: Thu Oct 14, 2004 9:05 am

Post by Rocky »

Yes ,
i understant that...
But for frist time i missed it.... ok now acc..

Thank's Again
Rocky
TISARKER
Learning poster
Posts: 88
Joined: Tue Oct 12, 2004 6:45 pm
Location: Bangladesh
Contact:

10344(23 out of 5 ).

Post by TISARKER »

Are u getting wrong answer for 10344 (23 out of 5 ).
Try following hints.

Code: Select all

if value==23 or value==-23 print " Possible"
Otherwise print "Impossible\n".
Another tricky is Value may be long
Thanks :lol: :wink: :D :) :P
Mr. Arithmetic logic Unit
Post Reply

Return to “Volume 103 (10300-10399)”