Create an inline function that toggles the state of a GPIO pin.
Each pin state is represented as:
0
1
Your inline function must:
0 → 1
1 → 0
In main():
main()
n
Example
Input:
0 1 0 1 0 1 0 1 0 1 3 0 1 0
Output:
0 0 0 1 0 1 0 1 0 1
Explanation of Example:
Final state:
Input Constraints:
9
0 ≤ n ≤ 10^5
Test Cases
Test Results
Input
0 0 0 0 0 0 0 0 0 0 1 5
Expected Output
0 0 0 0 0 1 0 0 0 0