#include #include #include #include #include #include #include #include using namespace std; /* cin.ignore(); getline(cin,dataStr); data = new int[n]; stringToInteger(&dataStr,data,n); */ void stringToInteger(string *str,int *data,int n){ for(int i=0;ifind(' ',0); data[i] = atoi(str->substr(0,spaceN).c_str()); str->erase(0,spaceN+1); } } void swap(int *a,int *b){ int tmp = *a; *a = *b; *b = tmp; } void babbleSort(int *data,int n){ for(int i=0;ii;j--){ if(data[j]>=data[j-1]){ swap(&data[j],&data[j-1]); } } } } int main(){ int data[3]; cin>>data[0]>>data[1]>>data[2]; //0:biggest 2:smallest babbleSort(data,3); int tmp = data[1]-data[2]; if(data[0] - tmp*2 >= data[2]){ data[0] -= tmp*2; data[2] += tmp; int tmp2 = (data[0]-data[2])/5; data[0] -= tmp2*4; data[1] += tmp2; data[2] += tmp2; if(data[0]