EDF算法 #include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; class Process{ string name; int run_time; int dead_time; public: Process(string tname,int trun_time,int tdead_time):name(tname),run_time(trun_time),dead_time(tdead_time){ } void setRun_time(){ run_time--;} int getDead_time(){ return dead_time;} int getRun_time(){ return run_time;} string getName(){ return name;} bool OK(){ return run_time==0;} bool operator<(Process& p1){ return this->dead_time<p1.dead_time;} }; class EDF{ vector