#P16233. [蓝桥杯 2026 省 B] 双碳战略
[蓝桥杯 2026 省 B] 双碳战略
Problem Description
The intelligent upgrade of a city lighting system is a key pilot project for carrying out the national “dual-carbon” strategy. As a demonstration project, the Municipal Energy Bureau deployed a linear array of smart streetlights on a newly built green avenue.
Initially, all these streetlights are in the high-energy “all-on mode”. To evaluate the system’s response under extreme conditions, the central control system needs to traverse and simulate all switch combinations that theoretically exist.
However, limited by the physical properties of the underlying hardware, the control system must operate strictly according to a “two-way alternating” rule:
- On odd-numbered commands (the commands): the system must choose a streetlight (), and flip the switch states of this streetlight and all streetlights to its right (behind it) (on becomes off, off becomes on).
- On even-numbered commands (the commands): the system must choose a streetlight , and flip the switch states of this streetlight and all streetlights to its left (in front of it).
For streetlights, there are different on/off state combinations, and every state can definitely be reached. For each specific state, there exists a minimum number of commands needed to reach it from the initial “all-on” state (no matter how many different operation sequences can reach that state, only the one with the fewest steps counts).
Note: the initial “all-on” state is also included among these combinations, and the minimum number of operations to reach this state is defined as .
Now, please compute the sum of the minimum operation counts over all states. Since the sum may be very large, output the result modulo .
Output Format
This is an output-only fill-in-the-blank problem. You only need to compute the result and submit it. The result is an integer; when submitting your answer, fill in only this integer. Any extra content will make you score .
Hint
Translated by ChatGPT 5