10819 - Trouble of 13-Dots
Moderator: Board moderators
-
- Guru
- Posts: 647
- Joined: Wed Jun 26, 2002 10:12 pm
- Location: Hong Kong and New York City
- Contact:
10819 - Trouble of 13-Dots
I've submitted a few times, with a few variation, but all WA..
It seems like a trivial 0-1 Knapsack.. are there any tricks?
I tried both >= 2000 and > 2000.. is there any cases in which we can't take advantage of the 200$ rebate other than not being able to afford it? Thanks.
It seems like a trivial 0-1 Knapsack.. are there any tricks?
I tried both >= 2000 and > 2000.. is there any cases in which we can't take advantage of the 200$ rebate other than not being able to afford it? Thanks.
Check out http://www.algorithmist.com !
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
More input please
Hi,
Could you please post more sample input with output ?
I had a WA and my solutions give correct output for some examples I created.
With the question of the bonus..
Is there any problem doing this
if(m>2000)
m+=BONUS;
(It's > and not >=, right?)
Regards,
Jose Santos
Could you please post more sample input with output ?
I had a WA and my solutions give correct output for some examples I created.
With the question of the bonus..
Is there any problem doing this
if(m>2000)
m+=BONUS;
(It's > and not >=, right?)
Regards,
Jose Santos
Jose Santos
http://ctp.di.fct.unl.pt/~jcas
http://ctp.di.fct.unl.pt/~jcas
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
You are right!
I don't know why I didn't remember that :-|
Anyway, my submission still received WA
So, I must have other problems...
Can you give more input, please ?
Regards,
Jose Santos
I don't know why I didn't remember that :-|
Anyway, my submission still received WA
So, I must have other problems...
Can you give more input, please ?
Regards,
Jose Santos
Jose Santos
http://ctp.di.fct.unl.pt/~jcas
http://ctp.di.fct.unl.pt/~jcas
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
Last edited by liulike on Tue Feb 15, 2005 2:55 pm, edited 1 time in total.
Hi,
1900 3
2000 5
1950 1
101 1
output:
2
Why is output 2 in this case and not 5 ?
If she has 1900 she can spend up to 2100.
(since it's a credit card she can spend more than she has and at the end of the month she'll get the 200$ refund).
What's the catch ?
1900 3
2000 5
1950 1
101 1
output:
2
Why is output 2 in this case and not 5 ?
If she has 1900 she can spend up to 2100.
(since it's a credit card she can spend more than she has and at the end of the month she'll get the 200$ refund).
What's the catch ?
Jose Santos
http://ctp.di.fct.unl.pt/~jcas
http://ctp.di.fct.unl.pt/~jcas
1900 3
2000 5
1950 1
101 1
In this case, if she buy "2000 5", the total will NOT exceed 2000,
not possible to get 200 refund.
2000 5
1950 1
101 1
In this case, if she buy "2000 5", the total will NOT exceed 2000,
not possible to get 200 refund.
My signature:
- Please make discussion about the algorithm BRFORE posting source code.
We can learn much more in discussion than reading source code. - I HATE testing account.
- Don't send me source code for debug.
You are right...
I didn't consider that case because in reality it wouldn't make much sense. (I would certainly find a way to spend 1 dollar to get extra 200).
But it makes sense for the problem and I'll have to revise my source code.
Thanks:-)
Jose Santos
I didn't consider that case because in reality it wouldn't make much sense. (I would certainly find a way to spend 1 dollar to get extra 200).
But it makes sense for the problem and I'll have to revise my source code.
Thanks:-)
Jose Santos
Jose Santos
http://ctp.di.fct.unl.pt/~jcas
http://ctp.di.fct.unl.pt/~jcas
Are you sure you can always make a $1 transaction using a credit card? Imagine that you say to the shopkeeper of a boutique (say Dior), 'Please, get me something that cost exactly 1 dollar.'....erdos wrote:I didn't consider that case because in reality it wouldn't make much sense. (I would certainly find a way to spend 1 dollar to get extra 200).
(You may simply ignore this comment! )
Last edited by Observer on Tue Feb 15, 2005 2:21 pm, edited 2 times in total.
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
-
- Guru
- Posts: 647
- Joined: Wed Jun 26, 2002 10:12 pm
- Location: Hong Kong and New York City
- Contact:
Thanks Adrian for:
That was my problem!
Code: Select all
1900 3
2000 5
1950 1
101 1
Check out http://www.algorithmist.com !
I think I've fixed thar bug but I still get WA
Can someone post more problematic input, please ?
Regards,
Jose Santos
Can someone post more problematic input, please ?
Regards,
Jose Santos
Jose Santos
http://ctp.di.fct.unl.pt/~jcas
http://ctp.di.fct.unl.pt/~jcas
-
- New poster
- Posts: 9
- Joined: Fri Jan 21, 2005 6:46 pm
10819 - Trouble of 13-Dots
Should I sort the "price of the item" OR "favour index"?
But I think that those of them is not work....
How could do it?
But I think that those of them is not work....
How could do it?