check out https://en.wikipedia.org/wiki/Bertrand's_ballot_theorem
Anurag Rai <[email protected]>于2017年3月17日周五 上午5:16写道: > Problem: > https://codejam.withgoogle.com/codejam/contest/6304486/dashboard#s=p1 > > I solved for the small test case. Large test case was creating problem due > to large factorials. Upon seeing the solution by ppl, I see ppl doing > simply (N-M)/(N+M). > What is the intuition behind it. thanks in advance! > > -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-code/ce3fa4e6-6fb9-4812-af39-a8f25f2b277a%40googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/CAGDEU-J_qrs9%2Burui0FJsTo_Xqk8eO%3D04cnvf4fc8obBY_V7hw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
