#include #include int id= -1,n,k; int val[201]; struct depo { int rest; int pos; } dep[200]; int depot[200]; int rest[200]; int min, ming = 32766; void visit(int); int distmin(); int main(void) { FILE *fin, *fout; int t; int first, second,i,j; t =1; fin = fopen("fastfood.in", "r"); fout = stdout; while(fscanf(fin,"%d%d",&n,&k) && n != 0 && k != 0) { id = -1; ming = 32766; for(i = 0; i <= 200; i++) val[i]=0; for(i = 0; i abs(rest[i]-rest[val[j]])) { dep[i].rest = rest[val[j]]; dep[i].pos = val[j]; } } min = 0; for(i = 0; i< n; i++) min += abs(rest[i]-dep[i].rest); return min; }