10442 - Basic
Moderator: Board moderators
-
- New poster
- Posts: 23
- Joined: Mon Dec 16, 2002 8:01 pm
- Location: Portugal
- Contact:
10442 - Basic
this is as "basic" problem... but probably with crazy input!
can you give me some more sample input?
I also got some questions...
what is the output to the next input?
7
123
5
12#123#12#123#
15#aaa
2##
#145##145#15#145#
12#123# 15#abc#
my answer is
no
no
yes
no
no
yes
no
can you give me some more sample input?
I also got some questions...
what is the output to the next input?
7
123
5
12#123#12#123#
15#aaa
2##
#145##145#15#145#
12#123# 15#abc#
my answer is
no
no
yes
no
no
yes
no
Please visit my webpage!! I've got a lot of UVA statistics scripts
http://www.fe.up.pt/~ei01081/scripts/
http://www.fe.up.pt/~ei01081/scripts/
understanding of the problem
just a question, which I hope would clarify the problem (donno if it's just me, but I am confused by the description of the problem): what should be the output for the following input?
my guess would be
let me know if I am right or wrong please! thanx in advance!
Code: Select all
3
123##2#01001#
10#456##3#1210#
9#456##2#1210#
Code: Select all
yes
yes
no
Dealing with failure is easy: Work hard to improve.
Success is also easy to handle: You've solved the wrong problem. Work hard to improve.
Success is also easy to handle: You've solved the wrong problem. Work hard to improve.
Re: understanding of the problem
The correct answer for the above input is:zsepi wrote:just a question, which I hope would clarify the problem (donno if it's just me, but I am confused by the description of the problem): what should be the output for the following input?my guess would beCode: Select all
3 123##2#01001# 10#456##3#1210# 9#456##2#1210#
let me know if I am right or wrong please! thanx in advance!Code: Select all
yes yes no
no
no
no
The first one is invalid because no number can begin with 123##
The second one in invalid because base 456 is not between 2 and 16, and also because you need a double # after the 3.
The third is invalid for the same reasons as the second. In addition the
digit 2 is not allowed in a base 2 number.
thanks,
though I just feel even more confused - I thought I got the rules, but it seems I did not
in the standard input, the answer for the case 2#101##123# is yes - why? isn't there supposed to be only one number per line? or can you join additional number in the form _number_ (base#digits#)#_number_? because if that's the case, then 10#456##3#1210# should be yes (first number: 456 in base 10 and 1210 in base 3)
I just wanna know if that is possible to have more than one number on a line... and base 10 could be specified, right?
though I just feel even more confused - I thought I got the rules, but it seems I did not
in the standard input, the answer for the case 2#101##123# is yes - why? isn't there supposed to be only one number per line? or can you join additional number in the form _number_ (base#digits#)#_number_? because if that's the case, then 10#456##3#1210# should be yes (first number: 456 in base 10 and 1210 in base 3)
I just wanna know if that is possible to have more than one number on a line... and base 10 could be specified, right?
Dealing with failure is easy: Work hard to improve.
Success is also easy to handle: You've solved the wrong problem. Work hard to improve.
Success is also easy to handle: You've solved the wrong problem. Work hard to improve.
2#101# is the number 5 - 101 base 2zsepi wrote:thanks,
though I just feel even more confused - I thought I got the rules, but it seems I did not
in the standard input, the answer for the case 2#101##123# is yes - why? isn't there supposed to be only one number per line? or can you join additional number in the form _number_ (base#digits#)#_number_? because if that's the case, then 10#456##3#1210# should be yes (first number: 456 in base 10 and 1210 in base 3)
I just wanna know if that is possible to have more than one number on a line... and base 10 could be specified, right?
2#101##123# is 123 base 5 - a base (2#101# followed by
a sequence of base 5 digits enclosed in # (#123#)
-
- New poster
- Posts: 23
- Joined: Mon Dec 16, 2002 8:01 pm
- Location: Portugal
- Contact:
I've really misunderstood the problem... Now It works just fine, for every input in this topic... but I keep getting WA...
Please visit my webpage!! I've got a lot of UVA statistics scripts
http://www.fe.up.pt/~ei01081/scripts/
http://www.fe.up.pt/~ei01081/scripts/
-
- New poster
- Posts: 7
- Joined: Sat Mar 10, 2007 7:03 pm
I am puzzled for many WA. Would someone kindly please check with my I/O?
Input:
Output:
Also, any special cases to be catered? Thanks a lot
Input:
Code: Select all
25
2#10##111111111#
2#10##10##10##111111111#
2#101##20##16##12345abcdf#
2#101##20##11##12345a#
2#101##20##11##12345ab#
2#101##20##17##12345ab#
2#101##20##0##12345ab#
2#101##20##2##101#
2#101##20###2##101#
16#f##e##d##c##b##a##2##10##101##10##11##14##101#
16#f##e##d##c##b##a##2##10##101##10##11##24##abc#
16#f##0e##d##0c##b##0a##2##10##101##10##11##24##abc#
16#f##0e##d##0c##b##0a##2##10##101##10##11##24##000#
2#11##11##11##11##11##11##11##11##11##11##11##11##11##11##11#
2#11##11##11##11##11##11##11##11##11##11##11##11##11##11###
2#10##
2##
#2#
2#2#
002#000#
2#0001##1#
0
00
123
1a
Code: Select all
yes
yes
yes
yes
no
no
no
yes
no
yes
yes
yes
yes
yes
no
no
no
no
no
yes
no
yes
yes
yes
no
Your cases are correct. But there can be overflow problem. Check the cases...
Input:
Output:
Hope these help.
Input:
Code: Select all
2
16#100000002##100001#
16#1020
Code: Select all
no
no