#include #include #include using namespace std; int getValue(string &S,int x,int y,int z) { string S1; S1=S[x]; S1+=S[y]; S1+=S[z]; S.erase(z,1); S.erase(y,1); S.erase(x,1); return atol(S1.c_str()); } bool Check(string S,int x,int y,int z) { if (S[y]==S[z]){ return true; }else{ return false; } } int deal(string &S) { int i,j,k; int sLen=S.length(); int value=0; for (i=0;i>N; int nLen=N.length(); if (nLen<=2){ cout<<0<0){ int value=deal(n); if (value>0){ score+=value; }else{ break; } } if (maxScore