{"trustable":true,"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":"\u003cdiv class\u003d\"panel_content\"\u003e 爱丽丝非常受欢迎,每天都能收到很多鲜花。她有N个花瓶,编号从0到N-1。当她收到一些鲜花时,她会尝试把它们放在花瓶里,一个花瓶放一朵花。她随机选择一个花瓶A,尝试把一朵花放在花瓶里。如果花瓶里没有花,她会把花放进去,否则她会跳过这个花瓶。然后她会尝试把花放在花瓶A+1,A+2,...,N-1,直到没有剩余的花或者她已经尝试了花瓶N-1。剩下的花将被丢弃。当然,有时她会清理花瓶。因为花瓶太多,她会随机选择清理从A到B编号的花瓶(A \u003c\u003d B)。清理后的花瓶里的花将被丢弃。\u003c/div\u003e"}},{"title":"输入","value":{"format":"HTML","content":" 第一行包含一个整数T,表示测试用例的数量。\u003cbr\u003e 对于每个测试用例,第一行包含两个整数N(1 \u003c N \u003c 50001)和M(1 \u003c M \u003c 50001)。N是花瓶的数量,M是爱丽丝的操作次数。接下来的M行中,每行包含三个整数。一行中的第一个整数是K(1或2)。如果K是1,则后面跟着两个整数A和F。这表示爱丽丝收到F朵花并尝试先把一朵花放在花瓶A中。如果K是2,则后面跟着两个整数A和B。这表示主人想要清理从A到B编号的花瓶(A \u003c\u003d B)。"}},{"title":"输出","value":{"format":"HTML","content":" 对于K为1的每个操作,输出爱丽丝放第一朵花和最后一朵花的花瓶位置,用空格分隔。如果她一个也放不进去,则输出“无法放入任何一朵。”对于K为2的每个操作,输出被丢弃的花的数量。\u003cbr\u003e \u003cb\u003e在每个测试用例后输出一个空行。\u003c/b\u003e"}},{"title":"示例","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\r\n10 5\r\n1 3 5\r\n2 4 5\r\n1 1 8\r\n2 3 6\r\n1 8 8\r\n10 6\r\n1 2 5\r\n2 3 4\r\n1 0 8\r\n2 2 5\r\n1 4 4\r\n1 2 3\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e[pre]3 7\r\n2\r\n1 9\r\n4\r\nCan not put any one.\r\n\r\n2 6\r\n2\r\n0 9\r\n4\r\n4 5\r\n2 3\r\n\r\n[/pre]\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}