Re: [code jam] Chain reaction

2022-04-21 Thread Samuel Jawahar
Hello plesse let me known one good book for dynamic programing Regards Samuel On Tue, 19 Apr 2022, 10:12 Samuel Jawahar, wrote: > Thanks a lot sir for spending valuable time > I have done wrong one if condition that why it was failed > I corrected in practice mode it worked > > https://codingcom

Re: [code jam] Qualifications 2022 Twisty Little Passages Analysis Importance Sampling

2022-04-21 Thread Péter Erben
I see your point. The difference between our computations is how we interpret the phrase "weighted average". My interpretation was the following: if we have values {v_i} with weights {w_i} then the weighted average WA = (sum_{i=1..N} v_i * w_i) / (sum_{i=1..N} w_i). The important part is that th

Re: [code jam] Round 1A 2022 - Code Jam 2022: Equal Sum

2022-04-21 Thread Alexander Karpov
Thanks, all. It is strange that Google doesn't provide IMPOSSIBLE solution. Can someone share correct solution in python? пн, 18 апр. 2022 г., 22:02 Alexander Karpov : > Hi expert. > I am a beginner in Python. > I try to solve Equal Sum problem, but my submission is failed and I can't > see tes

Re: [code jam] Qualifications 2022 Twisty Little Passages Analysis Importance Sampling

2022-04-21 Thread porker2008
@Ricola, The formula for weighted average is Sum(value * weight) / Sum(weight) In your case, you have 500 room, with one passage, with weight 1 and you have 500 rooms with 9 passages and with weight 500/9 So Sum(value * weight) = 500 * 1 + 9 * 500 / 9 = 1000 and Sum(weight) = 50