Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Agenda::allibera(const int id_funcionari, const int principi, int final){
- final = (final > dia + D) ? dia + D : dia;
- int i = principi;
- bool lliure = true;
- while(i <= final and lliure){
- int j = 0;
- while(j < H and lliure){
- lliure = cites[i%MOD][id_funcionari - 1][j].es_lliure();
- ++j;
- }
- ++i;
- }
- if(lliure){
- i = principi;
- while(i <= final){
- int j = 0;
- while(j < H){
- cites[i%MOD][id_funcionari - 1][j].deshabilita();
- ++j;
- }
- ++i;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement