#C4889. Resource Allocation Problem

    ID: 48476 Type: Default 1000ms 256MiB

Resource Allocation Problem

Resource Allocation Problem

You are given three integers: total_resources, sub_teams, and min_resources_per_team. The task is to allocate the available resources equally among the sub-teams. Each sub-team should receive an allocation of resources computed by

$$ allocation = \left\lfloor \frac{total\_resources}{sub\_teams} \right\rfloor $$

If the maximum possible allocation per team (i.e. $$ \left\lfloor \frac{total\_resources}{sub\_teams} \right\rfloor $$) is less than the minimum required resource (min_resources_per_team) for a team, then the allocation is not possible. In such a case, you should output Insufficient resources!.

Otherwise, print the allocated resource value for each sub-team, separated by a single space. It is guaranteed that the division yields an integer result for valid allocations.

inputFormat

The input consists of a single line containing three space-separated integers:

  • total_resources (total number of resources available)
  • sub_teams (number of sub-teams)
  • min_resources_per_team (minimum resources required per team)

outputFormat

If the allocation is feasible, output a single line with the allocated resource number for each sub-team separated by a space. Otherwise, output the string Insufficient resources!.

## sample
100 5 15
20 20 20 20 20