{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027],[\u0027\\[\u0027,\u0027\\]\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdn.mathjax.org/mathjax/latest/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\u003e\n Alice is so popular that she can receive many flowers everyday. She has N vases numbered from 0 to N-1. When she receive some flowers, she will try to put them in the vases, one flower in one vase. She randomly choose the vase A and try to put a flower in the vase. If the there is no flower in the vase, she will put a flower in it, otherwise she skip this vase. And then she will try put in the vase A+1, A+2, ..., N-1, until there is no flower left or she has tried the vase N-1. The left flowers will be discarded. Of course, sometimes she will clean the vases. Because there are too many vases, she randomly choose to clean the vases numbered from A to B(A \u0026lt;\u003d B). The flowers in the cleaned vases will be discarded. \n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":" The first line contains an integer T, indicating the number of test cases. \n\u003cbr\u003e For each test case, the first line contains two integers N(1 \u0026lt; N \u0026lt; 50001) and M(1 \u0026lt; M \u0026lt; 50001). N is the number of vases, and M is the operations of Alice. Each of the next M lines contains three integers. The first integer of one line is K(1 or 2). If K is 1, then two integers A and F follow. It means Alice receive F flowers and try to put a flower in the vase A first. If K is 2, then two integers A and B follow. It means the owner would like to clean the vases numbered from A to B(A \u0026lt;\u003d B)."}},{"title":"Output","value":{"format":"HTML","content":" For each operation of which K is 1, output the position of the vase in which Alice put the first flower and last one, separated by a blank. If she can not put any one, then output \u0027Can not put any one.\u0027. For each operation of which K is 2, output the number of discarded flowers. \n\u003cbr\u003e \n\u003cb\u003eOutput one blank line after each test case.\u003c/b\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"2\n10 5\n1 3 5\n2 4 5\n1 1 8\n2 3 6\n1 8 8\n10 6\n1 2 5\n2 3 4\n1 0 8\n2 2 5\n1 4 4\n1 2 3"}},{"title":"Sample Output","value":{"format":"HTML","content":"3 7\n2\n1 9\n4\nCan not put any one.\n\n2 6\n2\n0 9\n4\n4 5\n2 3\n\n"}},{"title":"Hint","value":{"format":"HTML","content":""}}]}