#include #include int num[15]; int stack[20]; int scnt=0; int gAve=0; void saiki(int digit, int k){ int i; if(k == 0 && digit == 0){ int s; int tAve; int ssum = 0; double minAve = 9999999.0; double maxAve = 0.0; for(s=0;s ag ){ minAve = ag; } if(maxAve < ag ){ maxAve = ag; } ssum += stack[s]; } tAve = (int)ceil(maxAve-minAve); if(gAve < tAve){ gAve = tAve; } return; } for(i=1;i<=digit;i++){ stack[scnt] = i; scnt++; saiki(digit-i, k-1); scnt--; } return; } int main(void){ int i,n,k; scanf("%d", &n); scanf("%d", &k); for(i=0;i