Page 10 of 12

Wa, 333 - Recognizing Good ISBNs - Need more In/Output sampl

Posted: Sat Jun 07, 2008 10:16 pm
by kbr_iut
I am a stupid......today,,,i tried again this problem.within 15 minit.I solved and got AC........my previous code was very poor.....and I misunderstood the problem..For thos who are getting WA.
1. X appers only in the 10 th position.other wise it is invalid...10 th X is =10,,,others X is same to garbage and deal like other garbage character.
2.remove the initial and trailing spaces and tabs to printf the actuall string.
3.start finding sum1 and sum2 from the first occurance of a digit.
4.after scanning, if any garbage character is found before the number of valid digit is 10,,,the isbn is invalid.
5.and finally checkout if sum2 is of % 11 or not.



here are the things..if i mistake something ,let me know...
if anyone yet getting WA....contack with me,.....I will send him my source code.
kbr_iut@iut-dhaka.edu

Re: 333 - Recognizing Good ISBNs - Need more In/Output samples

Posted: Sun Jun 08, 2008 7:44 pm
by Jan
Try the cases...

Input:

Code: Select all

0-1-3-1-6-2-9-5-9-X
013152447X
Output:

Code: Select all

0-1-3-1-6-2-9-5-9-X is correct.
013152447X is correct.
Hope these help.

Re: 333 - Recognizing Good ISBNs - Need more In/Output samples

Posted: Thu Jun 12, 2008 12:15 pm
by kbr_iut
recoded and got AC

Re: 333 - Recognizing Good ISBNs - Need more In/Output samples

Posted: Thu Jun 12, 2008 9:32 pm
by Jan
Try the cases.

Input:

Code: Select all

0-89237-010- 6 TEST
<S><S><T><S>0823025713<T><T><S>
Output:

Code: Select all

0-89237-010- 6 TEST is correct.
<S><S><T><S>0823025713<T><T><S> is correct.

Re: 333 - Recognizing Good ISBNs - Need more In/Output samples

Posted: Sat Jun 14, 2008 3:36 pm
by kbr_iut
Got AC.

Re: 333 - Recognizing Good ISBNs - Need more In/Output samples

Posted: Thu Jul 24, 2008 8:03 am
by mukit
Dear Jan Vi,
You gave I/O for,

INPUT :

Code: Select all

0-89237-010- 6 TEST
<S><S><T><S>0823025713<T><T><S>
OUTPUT :

Code: Select all

0-89237-010- 6 TEST is correct.
<S><S><T><S>0823025713<T><T><S> is correct.
I also agree with this.
But one thing I don't understand, I find different result in here for this I/O :
http://www.uvatoolkit.com/problemssolve.php
And for this output once I became a sufferer.
Can you please explain ?

Re: 333 - Recognizing Good ISBNs - Need more In/Output samples

Posted: Fri Jul 25, 2008 12:45 am
by Jan
May be there are no such cases.

Re: 333 - Recognizing Good ISBNs - Need more In/Output samples

Posted: Fri Jul 25, 2008 2:16 pm
by mukit
But if there are no such cases then it would have show the message "No output!" with the cross sign.
Besides, I ignored this case and got wrong answer ! So there must be such input.

Am I making any wrong ??? I think I must . . .

Re: 333 - Recognizing Good ISBNs my AC code gives another...

Posted: Fri Jul 25, 2008 6:19 pm
by kbr_iut
but for the above input my AC code gives different output.
output

Code: Select all

0-89237-010- 6 TEST is incorrect.
<S><S><T><S>0823025713<T><T><S> is correct.

but uvatoolkit gives this output

Code: Select all

0-89237-010- 6 TEST is incorrect.
<S><S><T><S>0823025713<T><T><S> is incorrect.
actually why this is happening? can anyone tell? (of course there is not such test case...)

Re: 333 - Recognizing Good ISBNs - Need more In/Output samples

Posted: Fri Aug 22, 2008 12:36 am
by x140l31
I will explain the problem because there's too many confusions:

Sorry about my poor English.

1.- A valid ISBN can't be separated by spaces.
The input data for this problem will contain one candidate ISBN per line of input, perhaps preceded and/or followed by additional spaces.
it only says that the input have spaces "before" and "after" the ISBN candidate.

2.- A valid ISBN can ONLY have hyphens, digits and X for the LAST digit (hyphens can appears at anywhere, include at before any digit and after any digit). If it has any other character (include space) it's an invalid ISBN.
No line will contain more than 80 characters, but the candidate ISBN may contain illegal characters, and more or fewer than the required 10 digits. Valid ISBNs may include hyphens at arbitrary locations. The end of file marks the end of the input data.
the candidate may contain ILLEGAL characters, not a valid ISBN, and if it's an illegal character it's not valid!! (illegal can't be the same as "garbage")


I hope it will help you.

Obviously my AC code follow this rules, if any other AC code doesn't follow the same rules it's because the judge doesn't contemplate this cases...

333 - Recognizing Good ISBN- Need more In/Output samples

Posted: Wed Apr 01, 2009 9:21 pm
by sazzadcsedu
Can someone give me some critical i/o.
what is the output for
[blank]
(space)is incorrect. or
is incorrect.
and what will be answer of
0-89237-010- 6 TEST
<S><S><T><S>0823025713<T><T><S>
correct or incorrect???

Re: 333 - Recognizing Good ISBNs

Posted: Tue May 12, 2009 2:05 pm
by calicratis19
0-89237-010-6 test
0-89237-010-6 TEST

output:
correct
incorrect
this are the output frm http://www.uvatoolkit.com/problemssolve.php

but i dont understand why?? problem statement dont say that case matters or this kind of input(with alphabet except X as 10th number) can be correct. from previous thread someone's AC out put for this input
0-89237-010-6 TEST
output:
correct

so i think a valid isbn only can contain hipen ,digits and can have X as 10th number. am i wrong. :o :o
im so confused.. :x :x :x

Re: 333 - Recognizing Good ISBNs - i was right

Posted: Tue May 12, 2009 5:30 pm
by calicratis19
just got AC. i was right abt the validity of isbn.
so i think a valid isbn only can contain hipen ,digits and can have X as 10th number
and there is no alpahabet in the input set i think. because it gives different output in different AC codes for alphabet.
i gave output incorrect if any alphabet is found.

Re: 333 - Recognizing Good ISBNs

Posted: Sun Jun 07, 2009 4:10 pm
by x140l31
calicratis19 wrote:0-89237-010-6 test
0-89237-010-6 TEST

output:
correct
incorrect
this are the output frm http://www.uvatoolkit.com/problemssolve.php

but i dont understand why?? problem statement dont say that case matters or this kind of input(with alphabet except X as 10th number) can be correct. from previous thread someone's AC out put for this input
0-89237-010-6 TEST
output:
correct

so i think a valid isbn only can contain hipen ,digits and can have X as 10th number. am i wrong. :o :o
im so confused.. :x :x :x
My AC code says "incorrect" for this two inputs

Re: 333 - Recognizing Good ISBNs - Need more In/Output samples

Posted: Wed Jun 17, 2009 9:28 am
by calicratis19
i think there is no input like this in judge input.