
11028 - Sum of Product
Moderator: Board moderators
-
- Experienced poster
- Posts: 136
- Joined: Fri Apr 15, 2005 3:47 pm
- Location: Singapore
- Contact:
11028 - Sum of Product
How to solve this problem ??? should we generate all permutation ???
or is there any faster method ???? Thx...

um..
generation of all permutation will surely time out... n < 2^31
do you have to consider all the characters..
... or only half
hope it helps.
do you have to consider all the characters..
... or only half

hope it helps.
-
- Experienced poster
- Posts: 161
- Joined: Tue Oct 25, 2005 8:38 pm
- Location: buet, dhaka, bangladesh
i think it's a very good idea to always mention the problem name with the problem number as the subject ("11028 - sum of product"). it helps people to quickly understand which problem is that, without seeing the problem set.
ishtiak zaman
----------------
the world is nothing but a good program, and we are all some instances of the program
----------------
the world is nothing but a good program, and we are all some instances of the program
sohel wrote:ooops...![]()
no you don't have time to generate all the permutations.
One hint: Look at the AC times of everyone.. most 0.00 sec(and that's without precalculation)
Hope i am talking about the right problem this time...
I have got accepted

I think people have solved in the same way I did

Find few of them and try (by any means programming or non-programming ) to get the others.. Yes, I mean any means

Hope didn't say too much nor too less

If I will myself do hashing, then who will do coding !!!
Hi,vinay, u said too lessvinay wrote:sohel wrote:ooops...![]()
no you don't have time to generate all the permutations.
One hint: Look at the AC times of everyone.. most 0.00 sec(and that's without precalculation)
Hope i am talking about the right problem this time...
I have got accepted![]()
I think people have solved in the same way I did![]()
Find few of them and try (by any means programming or non-programming ) to get the others.. Yes, I mean any means![]()
Hope didn't say too much nor too less


I still have no idea how to get others...Or can anyone give any more hints ?? Thanks in advance!
close form... :-)
I think Vinay said enough... 
I was looking for a closed form solution !!!
Then, the obvious question might arise: why is the input range <= 20 ?
It is some sort of trick or a deceiver, if you will. I tried to create some confusion, so that many will be tempted to think there is some sort of backtrack solution.
Normally, this sort of problems should not be set in real time programming contests, but since this was an online contest I thought otherwise. Everyone has access to resources that hunts for integer sequence. If this type of problems were set in icpc, i would have been the first one to make a complaint...
BTW: all of my above points are based on the fact that there is no backtrack solution( AFAIK ) , but if there is a bctr soln or the formula is derivable in real time contest.. then forget everything i said.
However, the prob itself is interesting enough, eventhough the soln isn't.

I was looking for a closed form solution !!!
Then, the obvious question might arise: why is the input range <= 20 ?
It is some sort of trick or a deceiver, if you will. I tried to create some confusion, so that many will be tempted to think there is some sort of backtrack solution.

Normally, this sort of problems should not be set in real time programming contests, but since this was an online contest I thought otherwise. Everyone has access to resources that hunts for integer sequence. If this type of problems were set in icpc, i would have been the first one to make a complaint...

BTW: all of my above points are based on the fact that there is no backtrack solution( AFAIK ) , but if there is a bctr soln or the formula is derivable in real time contest.. then forget everything i said.

However, the prob itself is interesting enough, eventhough the soln isn't.
I dont think that non progrmming skills are needed here you just focus on the problem it's a little trickier but can be solved ( without googling).vinay wrote:
I have got accepted
I think people have solved in the same way I did
Find few of them and try (by any means programming or non-programming ) to get the others.. Yes, I mean any means
Hope didn't say too much nor too less
Solved the problem and got AC in .002 sec

Efficiency is more important than just solving the problem.
How do u know that i googled. I may have used yahoo or any other resourcemorpheous wrote: I dont think that non progrmming skills are needed here you just focus on the problem it's a little trickier but can be solved ( without googling).
Solved the problem and got AC in .002 sec
If I will myself do hashing, then who will do coding !!!
I think "google" is a verb in English now, meaning "search Internet", not necessarily using Google. It might even be in the Oxford dictionary by now (not sure).
And - given a sequence of integers, you can come up with polynomials that will produce them, but I never tried that approach.
The whole point is - people should be aware of the Online Encyclopedia of Integer Sequences, especially if that was the intended solution. There is a link to Dartboard Sequence there. Note that Brown said that at that time the sequence wasn't in the Encyclopedia. (I don't know how long ago "that time" was)
Just spread the word
And - given a sequence of integers, you can come up with polynomials that will produce them, but I never tried that approach.
The whole point is - people should be aware of the Online Encyclopedia of Integer Sequences, especially if that was the intended solution. There is a link to Dartboard Sequence there. Note that Brown said that at that time the sequence wasn't in the Encyclopedia. (I don't know how long ago "that time" was)
Just spread the word

-
- Learning poster
- Posts: 99
- Joined: Sun Apr 06, 2003 5:53 am
- Location: Dhaka, Bangladesh
- Contact:
Hi .. I have wasted a whole today thinking about a traditional solution to this problem ... is GOOGLE the only solution to this problem ??? If anyone has solved it with some other way plz can u share your algo ??
And I completely agree with Darko .. GOOGLE is an english verb now (at least for us
)
And I completely agree with Darko .. GOOGLE is an english verb now (at least for us

Where's the "Any" key?