Source: EMC-2017-P2
Category: Extremal Problems

Problem: A football match lasts $90$ minutes. A team always has $11$ players on the field at the same time. The coach wants each player's playing time to be the same integer number of minutes.

(1) If each player's playing time is less than $60$ minutes, what is the minimum number of players on the team?

(2) Under the condition of the minimum number of players in (1), what is the minimum number of substitutions required?

Note: Substitutions can only occur at integer minutes, the time for substitution is negligible, and substituted players can return to the field.

Answer: (1) $18$; (2) $17$

Reference solution:
**Final Answers:**
(1) $18$ players
(2) $17$ substitutions

**Part (1)**
Suppose there are $n$ players on the team, and each player's playing time is exactly $k$ minutes. Both $n$ and $k$ must be positive integers. Since there are always $11$ players on the field during the $90$-minute match, the total playing time for all players combined is $11 \times 90 = 990$ minutes. Therefore, we have the equation:
$nk = 990$

We are given that each player's playing time is strictly less than $60$ minutes, so $k < 60$. Since $k$ must be an integer that divides $990$, the maximum possible value for $k$ is $55$. 
Using $k \le 55$, we find:
$n = \frac{990}{k} \ge \frac{990}{55} = 18$
Thus, the team must have a minimum of $18$ players.

**Part (2)**
Assume the team has the minimum of $18$ players, meaning each player plays exactly $55$ minutes. 

We model the substitution process as a graph. Let each of the $18$ players be represented by a vertex. An edge is drawn between two vertices if one of the corresponding players directly substitutes the other. 

Suppose, for the sake of contradiction, that this graph is disconnected. Let the smallest connected component of the graph contain $l$ vertices. Since the graph is disconnected and has $18$ vertices in total, the smallest component can have at most half the vertices, meaning $l \le \frac{18}{2} = 9$. 

Let these $l$ vertices correspond to a specific group of players. Suppose that at any given time, there are $m$ players from this group on the field. Because substitutions within this component only happen among these $l$ players, the number of players $m$ from this group on the field must remain constant throughout the entire $90$-minute match. 

The total playing time contributed by these $l$ players is $55l$ minutes. Since exactly $m$ players from this group are on the field at all times during the $90$-minute match, their total playing time can also be expressed as $90m$ minutes. Equating the two gives:
$55l = 90m$
$11l = 18m$

Since $11$ and $18$ are coprime, $18$ must divide $l$. However, this implies $l \ge 18$, which directly contradicts our earlier deduction that $l \le 9$. 

Therefore, our assumption that the graph is disconnected must be false. The graph must be connected. A connected graph with $18$ vertices must have at least $18 - 1 = 17$ edges. Since each edge represents a substitution, there must be at least $17$ substitutions. 

This theoretical minimum of $17$ substitutions can indeed be achieved in practice. It is possible to arrange the $11$ players on the field at each time such that exactly $17$ substitutions are made, with one substitution occurring every $5$ minutes.

Grading guidelines:
(Partial) 1. Set up the counting equation total player-minutes = 11·90 = 990, hence if there are n players each playing k minutes then nk = 990 with n,k integers. 2. Used the constraint k < 60 to deduce a lower bound on n via a divisor bound for k (e.g. noting k ≤ 55 since 990 has no divisor in {56,57,58,59}), giving n ≥ 18. 3. For part (2), introduced a substitution graph (vertices = players, edge when one directly substitutes the other) and correctly argued that if the graph had a component of size l with m of its players always on the field, then 55l = 90m (or equivalent invariant), leading to a divisibility restriction on l. (Almost) 1. Correctly proved n = 18 is minimal in (1), and for (2) proved the substitution graph must be connected and hence at least 17 substitutions are necessary, but did not provide (or gave an incomplete) explicit schedule achieving 17 substitutions. 2. Gave a construction intending to realize 17 substitutions (e.g. substitutions every 5 minutes) and checked most player-times equal 55, but left a small number of players’ minutes (or a boundary time at start/end) unchecked/miscounted. 3. Solution is almost complete, but made minor mistakes which are not negligible.

Construction task:
Provide an explicit 90-minute playing schedule for the minimum number of players $N$ found in part (1), such that each player's total playing time is the same integer and the total number of substitutions is minimized as in part (2).

Output requirements:
- The construction must be a single Python expression. Evaluating this expression must directly return the required schedule list.
- The value of the expression must be exactly one Python list of entries `[start, end, lineup]`.
- `start` and `end` are the start and end times (in minutes) of a period where the lineup remains constant.
- `lineup` is a sorted list of the 11 players on the field during that period.
- Players must be numbered $1, 2, \dots, N$.
- The periods must be contiguous and cover the full 90 minutes.
- All players must have the same integer total playing time, and this time must be less than 60 minutes.
- A substitution is defined as a player entering the field who was not in the previous period's lineup. The total number of substitutions is the sum of these entrance counts across all transitions. This total must be minimized.
- Do not use explanations, comments, assignments, imports, function definitions, or any non-expression content.
- Put ONLY the Python expression inside the `<construct>` block.

Reference construction:
[[5*i, 5*(i+1), sorted(((i+j) % 18) + 1 for j in range(11))] for i in range(18)]

Verifier code:
import sys

def verify():
    try:
        raw_input = sys.stdin.read().strip()
        if not raw_input:
            print("No input provided.")
            return
        safe_globals = {"__builtins__": {}, "range": range, "sorted": sorted}
        data = eval(raw_input, safe_globals, {})
    except Exception as e:
        print(f"Failed to evaluate construction: {e}")
        return

    if not isinstance(data, list):
        print("Construction must evaluate to a list.")
        return

    current_time = 0
    player_times = {}
    total_subs = 0
    previous_lineup = None

    for i, entry in enumerate(data):
        if not (isinstance(entry, list) and len(entry) == 3):
            print(f"Entry {i} must be a list of [start, end, lineup].")
            return

        start, end, lineup = entry

        if not (isinstance(start, int) and isinstance(end, int)):
            print(f"Start and end times must be integers in entry {i}.")
            return

        if start != current_time:
            print(f"Gap or overlap in time at entry {i}: expected start {current_time}, got {start}.")
            return

        if end <= start:
            print(f"End time must be greater than start time in entry {i}.")
            return

        if not isinstance(lineup, list) or len(lineup) != 11:
            print(f"Lineup must be a list of 11 players in entry {i}.")
            return

        if lineup != sorted(list(set(lineup))):
            print(f"Lineup must be sorted and contain 11 distinct player IDs in entry {i}.")
            return

        for p in lineup:
            if not isinstance(p, int) or p <= 0:
                print(f"Player IDs must be positive integers in entry {i}.")
                return
            player_times[p] = player_times.get(p, 0) + (end - start)

        if previous_lineup is not None:
            subs = len(set(lineup) - set(previous_lineup))
            total_subs += subs

        previous_lineup = lineup
        current_time = end

    if current_time != 90:
        print(f"Schedule must cover exactly 90 minutes, but ends at {current_time}.")
        return

    if not player_times:
        print("No players found in the schedule.")
        return

    times = set(player_times.values())
    if len(times) != 1:
        print(f"Not all players have the same playing time. Playing times: {player_times}")
        return

    T = list(times)[0]
    if T >= 60:
        print(f"Total playing time {T} must be less than 60 minutes.")
        return

    N = len(player_times)
    if N != 18:
        print(f"Number of players {N} is not the minimum required (18).")
        return

    if set(player_times.keys()) != set(range(1, 19)):
        print(f"Player IDs must be 1, 2, ..., 18. Found IDs: {sorted(player_times.keys())}")
        return

    if total_subs != 17:
        print(f"Total substitutions {total_subs} is not the minimum required (17).")
        return

    print("True")

if __name__ == "__main__":
    verify()