[Huawei OD Unified Exam B Paper | 100 points] User scheduling problem (C++ Java JavaScript Python)

Title Description User Scheduling Problem

In communication systems, a common problem is that scheduling users with different strategies will result in different system consumption and performance.

Assuming that there are currently n users to be scheduled in series, each user can use three different scheduling strategies of A/B/C, and different strategies will consume different system resources. Please perform user scheduling according to the following rules, and return the total number of consumed resources.

rule:

  1. Adjacent users cannot use the same scheduling policy. For example, if the first user uses policy A, the second user can only use policy B or C.

  2. For a single user, the consumption of system resources by different scheduling strategies can be

Guess you like

Origin blog.csdn.net/shangyanaf/article/details/130926566