{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem.\r\u003cbr\u003e\r\u003cbr\u003eThere is a very long board with length L centimeter, L is a positive integer, so we can evenly divide the board into L segments, and they are labeled by 1, 2, ... L from left to right, each is 1 centimeter long. Now we have to color the board - one segment with only one color. We can do following two operations on the board:\r\u003cbr\u003e\r\u003cbr\u003e1. \"C A B C\" Color the board from segment A to segment B with color C. \r\u003cbr\u003e2. \"P A B\" Output the number of different colors painted between segment A and segment B (including).\r\u003cbr\u003e\r\u003cbr\u003eIn our daily life, we have very few words to describe a color (red, green, blue, yellow…), so you may assume that the total number of different colors T is very small. To make it simple, we express the names of colors as color 1, color 2, ... color T. At the beginning, the board was painted in color 1. Now the rest of problem is left to your.\r\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"First line of input contains L (1 \u0026lt;\u003d L \u0026lt;\u003d 100000), T (1 \u0026lt;\u003d T \u0026lt;\u003d 30) and O (1 \u0026lt;\u003d O \u0026lt;\u003d 100000). Here O denotes the number of operations. Following O lines, each contains \"C A B C\" or \"P A B\" (here A, B, C are integers, and A may be larger than B) as an operation defined previously."}},{"title":"Output","value":{"format":"HTML","content":"Ouput results of the output operation in order, each line contains a number."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2 2 4\r\nC 1 1 2\r\nP 1 2\r\nC 2 2 2\r\nP 1 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\r\n1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}