voidFCFS(intn){//第一个进程先服务FinishTime[0]=ArrivalTime[0]+ServiceTime[0];WholeTime[0]=FinishTime[0]-ArrivalTime[0];WeightWholeTime[0]=double(WholeTime[0])/double(ServiceTime[0]);for(inti=1;iArrivalTime[i])FinishTime[i]=FinishTime[i-1]+ServiceTime[i]