P2294 [HNOI2005] The Cunning Merchant

Description

Diao Cha receives a task from the tax authority to investigate a merchant’s ledger and determine whether it is forged. The ledger records the income over $n$ months, where the income in month $i$ is $a_i$, $i=1,2,\ldots,n-1,n$. When $a_i>0$, it means the profit in that month is $a_i$ yuan; when $a_i

Input Format

The first line contains a positive integer $w$, where $w

Output Format

Output $w$ lines, each containing `true` or `false`. The $i$-th line is `true` if and only if the $i$-th test case, i.e., the $i$-th ledger, is not fake; the $i$-th line is `false` if and only if the $i$-th test case, i.e., the $i$-th ledger, is fake.

Explanation/Hint

Translated by ChatGPT 5