SP7259 LITE - Light Switching

Description

Farmer John tries to keep the cows sharp by letting them play with intellectual toys. One of the larger toys is the lights in the barn. Each of the N (2

Input Format

Line 1: Two space-separated integers: N and M Lines 2..M+1: Each line represents an operation with three space-separated integers: operation, S\_i, and E\_i

Output Format

Lines 1..number of queries: For each output query, print the count as an integer by itself on a single line.