We have two generators made by AI. One is wrong on one test, the other is wrong on another - 马德尤
Task
The organizing committee decided to be very short, brief and terse with the statement of this problem, because of many obvious reasons.
We call an array of integer elements chic if the sum of its elements is even.
Consider = the number of arrays of elements from such that the chosen array has an even number of chic subarrays.
Given and , compute
Input data
You will have to answer tests. On the next lines, you will be given two numbers, and , with their meaning explained above.
Output data
You will have to print integers the answer for each case.
Constraints and clarifications
- , for all tests;
- , for all tests;
- A subarray of an array with elements is any contiguous subsequence of it (that is, of the form for some and with ).
| # | Score | Constraints |
|---|---|---|
| 1 | 30 | |
| 2 | 10 | |
| 3 | 60 | No further restrictions. |
Example
stdin
2
1 3
2 3
stdout
4
0
Explanation
There are cases.
For the first case, one can compute that and . Thus, the sum is .
For the second case, it can be proven that there exist no arrays that satisfy the \textit{chic} condition.