{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"Samir returned home from the contest and got angry after seeing his room dusty. Who likes to see a dusty room after a brain storming programming contest? After checking a bit he found a brush in his room which has width **w**. Dusts are defined as 2D points. And since they are scattered everywhere, Samir is a bit confused what to do. He asked Samee and found his idea. So, he attached a rope with the brush such that it can be moved horizontally (in **X** axis) with the help of the rope but in straight line. He places it anywhere and moves it. For example, the **y** co-ordinate of the bottom part of the brush is 2 and its width is 3, so the **y** coordinate of the upper side of the brush will be 5. And if the brush is moved, all dusts whose **y** co-ordinates are between 2 and 5 (inclusive) will be cleaned. After cleaning all the dusts in that part, Samir places the brush in another place and uses the same procedure. He defined a **move** as placing the brush in a place and cleaning all the dusts in the horizontal zone of the brush.\n\n![Brush](CDN_BASE_URL/cc8fd9bfc546ee65d4424bac3ca9387e?v\u003d1715866795)\n\nYou can assume that the rope is sufficiently large. Since Samir is too lazy, he doesn\u0027t want to clean all the room. Instead of doing it he thought that he would use at most **k** moves. Now he wants to find the maximum number of dust units he can clean using at most **k** moves. Please help him."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 100)**, denoting the number of test cases.\n\nEach case starts with a blank line. The next line contains three integers **N (1 \u0026le; N \u0026le; 100), w (1 \u0026le; w \u0026le; 10000)** and **k (1 \u0026le; k \u0026le; 100)**. **N** means that there are N dust points. Each of the next **N** lines contains two integers: **x\u003csub\u003ei\u003c/sub\u003e y\u003csub\u003ei\u003c/sub\u003e** denoting the coordinates of the dusts. You can assume that **(-10\u003csup\u003e9\u003c/sup\u003e \u0026le; x\u003csub\u003ei\u003c/sub\u003e, y\u003csub\u003ei\u003c/sub\u003e \u0026le; 10\u003csup\u003e9\u003c/sup\u003e)** and all points are distinct."}},{"title":"Output","value":{"format":"MD","content":"For each case print the case number and the maximum number of dusts Samir can clean using at most **k** moves."}},{"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\n\n3 2 1\n0 0\n20 2\n30 2\n\n3 1 1\n0 0\n20 2\n30 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 3\nCase 2: 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}