{"problem":{"name":"Flipping Signs","description":{"content":"There are $N$ integers, $A_1, A_2, ..., A_N$, arranged in a row in this order. You can perform the following operation on this integer sequence any number of times: **Operation**: Choose an integer $i","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc125_d"},"statements":[{"statement_type":"Markdown","content":"There are $N$ integers, $A_1, A_2, ..., A_N$, arranged in a row in this order.\nYou can perform the following operation on this integer sequence any number of times:\n**Operation**: Choose an integer $i$ satisfying $1 \\leq i \\leq N-1$. Multiply both $A_i$ and $A_{i+1}$ by $-1$.\nLet $B_1, B_2, ..., B_N$ be the integer sequence after your operations.\nFind the maximum possible value of $B_1 + B_2 + ... + B_N$.\n\n## Constraints\n\n*   All values in input are integers.\n*   $2 \\leq N \\leq 10^5$\n*   $-10^9 \\leq A_i \\leq 10^9$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$A_1$ $A_2$ $...$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc125_d","tags":[],"sample_group":[["3\n-10 5 -4","19\n\nIf we perform the operation as follows:\n\n*   Choose $1$ as $i$, which changes the sequence to $10, -5, -4$.\n*   Choose $2$ as $i$, which changes the sequence to $10, 5, 4$.\n\nwe have $B_1 = 10, B_2 = 5, B_3 = 4$. The sum here, $B_1 + B_2 + B_3 = 10 + 5 + 4 = 19$, is the maximum possible result."],["5\n10 -4 -8 -11 3","30"],["11\n-1000000000 1000000000 -1000000000 1000000000 -1000000000 0 1000000000 -1000000000 1000000000 -1000000000 1000000000","10000000000\n\nThe output may not fit into a $32$\\-bit integer type."]],"created_at":"2026-03-03 11:01:14"}}