What if activities have weights (profits)? Maximize total weight of selected activities.
Example: activities = [(, , ), (, , ), (, , )]. Weights: , , . Greedy by end time: (1,4) then (5,7). Total weight: + = . Alternative: (3,5) then (5,7). Total weight: + = . Greedy wins here.
But with different weights, greedy can fail. Weighted activity selection needs DP. The weight breaks the greedy property. A low-weight activity ending early might block high-weight activities.