#include #include #include using namespace std; int N; vectorA; int p,m; main() { cin>>N; for(int i=0;i>c; if(c=='+')p++; else if(c=='-')m++; else A.push_back(c-'0'); } sort(A.begin(),A.end()); vectorB; for(int i=0;i=B.size())L-=B[i]; else L+=B[i]; } if(m==0) { vectorS(p+1,0); for(int i=0;i