C
C#2y ago
popcorn

❔ Which algorithm should I use, CP

Hi, I have a task:
Find maximum possible reward and number of eliminated opponents each round after k rounds, when you have 100 opponents and you have to eliminate at least 1 in each round. The reward for eliminating opponents is 100.000 * (e / c).
Where e is number of opponents that are being eliminated in the round
c is number of remaining opponents.
Find maximum possible reward and number of eliminated opponents each round after k rounds, when you have 100 opponents and you have to eliminate at least 1 in each round. The reward for eliminating opponents is 100.000 * (e / c).
Where e is number of opponents that are being eliminated in the round
c is number of remaining opponents.
What algorithm should I use?
7 Replies
ChucklesTheBeard
brute force -> figure out the formula -> O(1)
popcorn
popcornOP2y ago
I forgot to add that I also need to return the number of eliminated opponents in each round.
ChucklesTheBeard
brute force -> figure out the formulas -> O(1)
popcorn
popcornOP2y ago
I don't think that there is a formula for that
ChucklesTheBeard
you might be surprised /shrug
Anton
Anton2y ago
Poisson binomial distribution
In probability theory and statistics, the Poisson binomial distribution is the discrete probability distribution of a sum of independent Bernoulli trials that are not necessarily identically distributed. The concept is named after Siméon Denis Poisson. In other words, it is the probability distribution of the number of successes in a collectio...
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server