Computer Science, asked by shivakankshisingh958, 3 months ago

Toggle switches
You are given a bulb connected with N switches. A swich can be either ON or OFF represented as #and respectively. The bulb will glow only
M
where (a) is the smallest integer that is greater than or equal to switches ON or set to 1
2
There are queres where each query is given a switch position which is toggled.
De the number of times the bulb changes its state from glowing to not glowing or vice versa.
toge means changing a switch state from ON to OFF that means from 1 to 0 ot OFF 10 ON that means from 0 to 1
The condition of switches is taken into consideration
The changes made by the queries are considered while evaluating the next queries.
eng is used in the problem statement
NE​

Answers

Answered by hridaypatel21
0

Answer:

fPimEND5SZyqe-msvS9ZwW:APA91bFFxpSn-ZLCoSrkx2OG7K7azQk9Sfadsdn6plSL6mL9FHaZ4QTcEctMCVUz5ejyschMOoUDXJGIa0m_dV2K8FZSwI2R6R9co61kQPEbw0jWE0YkmQLuGkp9rAmNuca_M6EMa02a

Explanation:

fPimEND5SZyqe-msvS9ZwW:APA91bFFxpSn-ZLCoSrkx2OG7K7azQk9Sfadsdn6plSL6mL9FHaZ4QTcEctMCVUz5ejyschMOoUDXJGIa0m_dV2K8FZSwI2R6R9co61kQPEbw0jWE0YkmQLuGkp9rAmNuca_M6EMa02a

Similar questions