func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, sum, prv[100010], val[100010], a[100010];   int main() {     scanf( %d , &n);     for (int i = 0; i < n; i++) scanf( %d , &a[i]);     for (int i = n - 1; i >= 0; i--) {       if (i == n - 1)         val[i] = 1, sum = a[i];       else {         if (sum <= a[i]) {           val[i] = 1;           prv[i] = -1;           sum = a[i] - sum;         } else {           val[i] = -1;           prv[i] = 1;           sum -= a[i];         }       }     }     for (int i = 0; i < n - 1; i++) {       val[i + 1] *= prv[i];       prv[i + 1] *= prv[i];     }     for (int i = 0; i < n; i++) printf(val[i] == 1 ?  +  :  - );     puts(  );   }   