Details:
There are N coins kept on the table, numbered from 0 to N - 1. Initially, each coin is kept tails up. You have to perform two types of operations:
1) Flip all coins numbered between A and B inclusive. This is represented by the command "0 A B"
2) Answer how many coins numbered between A and B inclusive are heads up. This is represented by the command "1 A B".
This is a(n):
Details: There are N coins kept on the table, numbered from 0 to N - 1. Initially, each coin is kept tails up. You have to perform two types of operations:
1) Flip all coins numbered between A and B inclusive. This is represented by the command "0 A B"
2) Answer how many coins numbered between A and B inclusive are heads up. This is represented by the command "1 A B".