Line split plane
Time Limit: 2000/1000 MS (Java/others) memory limit: 65536/32768 K (Java/Others)
Total submission (s): 16418 accepted submission (s): 11314
Problem description we have seen a lot of questions about straight line split planes. Today's questions are slightly changed. What we need is the maximum number of N line split planes. For example, a line can divide a plane into two parts. A line can divide a plane into seven parts at most, as shown below.
The first line of input data is an integer c, indicating the number of test instances, followed by data in Row C. Each row contains an integer N (0 <n <= 10000 ), the number of broken lines.
Output: For each test instance, the maximum number of partitions in the output plane. The output of each instance occupies one row.
Sample Input
212
Sample output
27
# Include <iostream> # include <cstring> using namespace STD; int main () {int N; CIN> N; while (n --) {int m; cin> m; cout <2 * m-m + 1 <Endl;} return 0 ;}