递归函数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

考虑如下的3参数递归函数w(a,b,c);

如果a≤0或b≤0或c≤0,则w(a,b,c)=1;

如果a>20或b>20或c>20,则w(a,b,c)=w(20,20,20);

如果其他情况下:w(a,b,c)=w(a-1,b,c)+w(a-1,b-1,c)+w(a-1,b,c-1)-w(a-1, b-1,c-1)。

设计一个程序,快速计算w(a,b,c)并给出结果。

输入格式

1行整数,包含3个数值,分别对应a、b和c的值。

输出格式

一个数,即w(a,b,c)的结果。

样例

input

50 50 50

output

1048576

限制与提示

时间限制:1s1 \text {s}

空间限制:256MB256 \text {MB}

寒假集训_01_15

Not Attended
Status
Done
Rule
XCPC
Problem
21
Start at
2025-1-15 14:00
End at
2025-1-15 17:00
Duration
3 hour(s)
Host
Partic.
38