#include "fstream.h" #include "string.h" char name[600][85],ctmp[20]; int nummove[600]; int seat[600]; int numset,nump; int maxmove; void main() { ifstream fin("probb.in"); ofstream fout("probb.out"); int j,k,i; fin >> numset; for (int thisset=1;thisset<=numset;thisset++) { fin >> nump; fin.getline(ctmp,100); maxmove=0; for (i=0;i=j;k--) { seat[k+1]=seat[k]; nummove[seat[k]]++; if (nummove[seat[k]]>maxmove) { maxmove=nummove[seat[k]]; } } seat[j]=i; // cout << name[i] << "\n"; } fout << "Data Set " << thisset << ":\n"; fout << "The following have to move " << maxmove << " times:\n"; for (i=0;i