小Y涂颜色
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.
题目描述
小Y在玩一种涂格子的游戏,游戏的规则是这样的,有一个 n 行 m 列的方阵。现在它要为这个方阵涂上黑白两种颜色。规定左右相邻两格的颜色不能相同。请你帮它统计一下有多少种涂色的方法。由于答案很大,你需要将答案对 1000000007 取模。
输入格式
输入两个数字n和m
输出格式
输出一个数字即为答案
2 2
4
提示
0403
- Status
- Done
- Rule
- IOI
- Problem
- 6
- Start at
- 2025-4-3 7:30
- End at
- 2025-4-3 12:00
- Duration
- 4.5 hour(s)
- Host
- Partic.
- 10