시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
3 초 | 512 MB | 58 | 15 | 9 | 25.000% |
Consider the following expression:
\[\sqrt{a_1} \pm \sqrt{a_2} \pm \cdots \pm \sqrt{a_n} = 0\text{.}\]
Calculate the number of ways to replace each \(\pm\) with \(+\) or \(-\) so that it holds true.
The first line of input contains a single integer \(n\) (\(2 \le n \le 36\)).
Second line of input contains \(n\) integers \(a_1, a_2, \dots , a_n\) (\(1 \le a_i \le 10^{10^5}\)).
Output a single integer: the answer to the problem.
3 2 2 8
1
4 4 9 25 49
0
Camp > Petrozavodsk Programming Camp > Summer 2019 > Day 4: Oleksandr Kulkov Contest 2 A번