SP12803 GRAPH2 - Graph
Description
Given an undirected graph with **n** nodes and **m** weighted edges, every node having one of two colors - black (denoted as 0) and white (denoted as 1). You are to perform **q** operations of two kinds:
1. **C** x: Change the _x_-th node´s color. A black node should be changed into a white node, and vice versa.
2. **Q** A B: Find the sum of weight of edges whose two end points of color A and B. A and B can be either 0 or 1.
Input Format
The first line contains two integers **n** (1
Output Format
For each **Q** query, print one line containing the desired answer.See samples for detailed format.