Combination part of this round 136 C problem not making sense
Difference between en1 and en2, changed 40 character(s)
[problem:1739C]In the problem[(this one)](https://codeforces.com/contest/1739/problem/C), when finding combinations(just learned them while solving this problem), we add previous values from n-2 function calling, like this<br/>
~~~~~
<br/>
def calc(n):
<br/>
    if n == 2:
<br/>
    return [1, 0, 1]
<br/>
    a = calc(n &mdash; 2)
<br/>
    return [comb(n &mdash; 1, n // 2) + a[1], comb(n &mdash; 2, n // 2) + a[0], 1]#[alex win,boris win,draw]
<br/>
~~~~~
<br/>

but why do we add up alex's winnings on n with boris's winnings during n-2? why does adding adding 1 players winnings with his losses with less cards make sense? Would appreciate a proper explanation from anyone. And is there something I need to study up on to get this? Thanks in advance.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English UnburnedZuko 2022-10-03 05:53:33 40 Tiny change: 'calc(n):\n if n' -> 'calc(n):\n\n if n'
en1 English UnburnedZuko 2022-10-03 05:51:04 779 Initial revision (published)