1234567891011121314151617
int LL=0,NN=0; for(int i = 0;i<allcourses[NN].length(); i++){ if(allcourses[NN][i] != '&') { eachalone[LL] += allcourses[NN][i]; } else {LL++;} if(LL>=3) { NN++; i=0; } }