The firmware must provide a system status indicator used by application logic to reflect runtime state.
The same application firmware must run on different hardware boards with incompatible GPIO wiring and control logic.
The target hardware board must be selected at build time and must never be chosen at runtime.
It must be impossible to build firmware that targets more than one hardware board at the same time.
The current codebase does not enforce this separation and cannot support multiple boards correctly.
Your task is to redesign the code so hardware differences are isolated behind a proper abstraction.
Program Flow:
N, representing the number of system events.N event values sequentially.1 requests the status indicator to toggle.0 requests no change.Input Format:
Input is provided via standard input (stdin).
N (integer)1 ≤ N ≤ 20N values:0 or 1)Output Format:
Print exactly N lines.
Each line must be exactly:
STATUS=ON or
STATUS=OFF Rules:
OFFExample:
Example 1
Input:
5
1 1 0 1 1
Output:
STATUS=ON
STATUS=OFF
STATUS=OFF
STATUS=ON
STATUS=OFF
Constraints:
main() must not be modifiedValidation Requirement:
To validate portability:
Input
5 1 1 0 1 1
Expected Output
STATUS=ON STATUS=OFF STATUS=OFF STATUS=ON STATUS=OFF