#include using namespace std; const int MAXP = 10000; int profs[MAXP]; long opusNums[MAXP]; int nprofs; void printProfs() { for(int i=0; i> nprofs; for(int i=0; i> opusNums[i]; profs[i] = i+1; } int curr = 0; int numThere = nprofs; while (numThere > 1) { //printProfs(); int count = opusNums[curr]-1; for(int i=0; i