{"raw_statement":[{"iden":"statement","content":"Alice, Beto, and Carlos are playing with twine. Alice starts by pulling taut the string of twine, then she folds it and holds the string at the fold. Beto holds the loose ends on the other side. They then repeat the following procedure. Carlos cuts the string with scissors, thus separating Alice and Beto. Alice, without letting go of the strings she was holding, grabs the loose ends of the strings held by Beto and he does the same to the loose ends of the strings held by Alice.\n\nHow many separate strings will they have after the procedure is repeated K times?\n\nThe input has a single integer, K.\n\nThe output has a single integer, the amount of separate strings at the end of the process.\n\n"},{"iden":"input","content":"The input has a single integer, K.  0 ≤ K ≤ 30 "},{"iden":"output","content":"The output has a single integer, the amount of separate strings at the end of the process."},{"iden":"examples","content":"Input0Output1Input1Output3"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ T \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case, let $ A = (a_1, a_2, \\dots, a_N) $ be an array of $ N $ integers.  \nA *subarray* is a contiguous non-empty sequence $ A[i:j] = (a_i, a_{i+1}, \\dots, a_j) $ for $ 1 \\leq i \\leq j \\leq N $.  \nThe *strength* of a subarray is the sum of its elements: $ \\text{strength}(A[i:j]) = \\sum_{k=i}^j a_k $.  \n\n**Constraints**  \n1. $ 1 \\leq T \\leq 100 $  \n2. For each test case:  \n   - $ 2 \\leq N \\leq 10^5 $  \n   - $ -10^9 \\leq a_i \\leq 10^9 $ for all $ i \\in \\{1, \\dots, N\\} $  \n3. Two subarrays $ A[i_1:j_1] $ and $ A[i_2:j_2] $ are *non-intersecting* if $ j_1 < i_2 $ or $ j_2 < i_1 $.  \n\n**Objective**  \nFor each test case, compute:  \n$$\n\\max_{\\substack{A[i_1:j_1], A[i_2:j_2] \\\\ \\text{non-intersecting}}} \\left| \\text{strength}(A[i_1:j_1]) - \\text{strength}(A[i_2:j_2]) \\right|\n$$","simple_statement":"Given an array, find the maximum absolute difference between the sums of two non-overlapping subarrays.","has_page_source":false}