3065: 【普及+/提高】【P2638】安全系统

内存限制:128 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:1 解决:1

题目描述

特斯拉公司的六位密码被轻松破解后,引发了人们对电动车的安全性能的怀疑。李华听闻后,自己设计了一套密码:

  • 假设安全系统中有 lns="http://www.w3.org/1998/Math/MathML"> 个储存区,每个储存区最多能存储存 lns="http://www.w3.org/1998/Math/MathML">2 个种类不同的信号(可以不储存任何信号)。有 lns="http://www.w3.org/1998/Math/MathML">0 和 lns="http://www.w3.org/1998/Math/MathML">1 这两种信号,其中 lns="http://www.w3.org/1998/Math/MathML">0 有 lns="http://www.w3.org/1998/Math/MathML"> 个,lns="http://www.w3.org/1998/Math/MathML">1 有 lns="http://www.w3.org/1998/Math/MathML"> 个,单独一个 lns="http://www.w3.org/1998/Math/MathML">0 或 lns="http://www.w3.org/1998/Math/MathML">1 算一个信号。现要将这些信号储存在储存区中,lns="http://www.w3.org/1998/Math/MathML">0 和 lns="http://www.w3.org/1998/Math/MathML">1 可以不用全部储存,一个存储区可以存放任意多个 lns="http://www.w3.org/1998/Math/MathML">0 和任意多个 lns="http://www.w3.org/1998/Math/MathML">1。一种不同的储存方案经过李华处理后就将是一串不同的密码。

现在给出 lns="http://www.w3.org/1998/Math/MathML">,,,求可能的不同储存方案的个数。

说明/提示

所有 lns="http://www.w3.org/1998/Math/MathML">9 种方案如下:

储存区 lns="http://www.w3.org/1998/Math/MathML">1 储存区 lns="http://www.w3.org/1998/Math/MathML">2
lns="http://www.w3.org/1998/Math/MathML">NULL lns="http://www.w3.org/1998/Math/MathML">NULL
lns="http://www.w3.org/1998/Math/MathML">0 lns="http://www.w3.org/1998/Math/MathML">NULL
lns="http://www.w3.org/1998/Math/MathML">1 lns="http://www.w3.org/1998/Math/MathML">NULL
lns="http://www.w3.org/1998/Math/MathML">NULL lns="http://www.w3.org/1998/Math/MathML">0
lns="http://www.w3.org/1998/Math/MathML">NULL lns="http://www.w3.org/1998/Math/MathML">1
lns="http://www.w3.org/1998/Math/MathML">0,1 lns="http://www.w3.org/1998/Math/MathML">NULL
lns="http://www.w3.org/1998/Math/MathML">NULL lns="http://www.w3.org/1998/Math/MathML">0,1
lns="http://www.w3.org/1998/Math/MathML">1 lns="http://www.w3.org/1998/Math/MathML">0
lns="http://www.w3.org/1998/Math/MathML">0 lns="http://www.w3.org/1998/Math/MathML">1

对于全部数据,lns="http://www.w3.org/1998/Math/MathML">,50lns="http://www.w3.org/1998/Math/MathML">+50lns="http://www.w3.org/1998/Math/MathML">+50

输入

第一行:共 lns="http://www.w3.org/1998/Math/MathML">3 个整数,lns="http://www.w3.org/1998/Math/MathML">,,

输出

第一行:一个整数,表示方案个数。

样例输入 复制

2 1 1

样例输出 复制

9