{"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":"\n\u003cdiv class\u003d\"panel_content\"\u003e\n 杰克知道有一个位于秘密地区的巨大地下宝库。他有一台特殊设备,可以用来探测地下的宝藏。有一天,他带着这个设备出去,要确认这个宝库的位置。他在靠近秘密地区地表上选择了很多不同的地点。在每个地点,他使用设备来探测宝藏,并从中获得了一些数据,表示可能包含地下宝藏的地区。设备在每个地点的数据包括六个整数 x\u003csub\u003e1\u003c/sub\u003e、y\u003csub\u003e1\u003c/sub\u003e、z\u003csub\u003e1\u003c/sub\u003e、x\u003csub\u003e2\u003c/sub\u003e、y\u003csub\u003e2\u003c/sub\u003e 和 z\u003csub\u003e2\u003c/sub\u003e(x\u003csub\u003e1\u003c/sub\u003e\u0026lt;x\u003csub\u003e2\u003c/sub\u003e,y\u003csub\u003e1\u003c/sub\u003e\u0026lt;y\u003csub\u003e2\u003c/sub\u003e,z\u003csub\u003e1\u003c/sub\u003e\u0026lt;z\u003csub\u003e2\u003c/sub\u003e)。根据设备的说明,它们代表了地区的 x、y 和 z 坐标范围。也就是说,可能包含宝藏的地区的 x 坐标范围从 x\u003csub\u003e1\u003c/sub\u003e 到 x\u003csub\u003e2\u003c/sub\u003e,y 和 z 坐标也是如此。坐标的原点是地下固定点。\n \u003cbr\u003e\n 杰克无法得知宝库的总体积,因为这些地区并不总是包含宝藏。通过多年的经验,他发现,如果在两个以上的地点检测到可能包含宝藏的地区,那么这个地区真的存在宝藏。现在,杰克只想知道宝库的最小体积。\n \u003cbr\u003e\n 现在,杰克将这个问题托付给你。\n \u003cbr\u003e\n \u003cbr\u003e\n\u003c/div\u003e\n"}},{"title":"输入","value":{"format":"HTML","content":"输入文件的第一行包含一个整数 t,表示测试用例的数量,然后是每个测试用例的输入数据。\n\u003cbr\u003e\n每个测试用例由若干行组成。在第一行,有一个整数 n(1 ≤ n ≤ 1000),表示他探测到的地表上的点的数量。然后,后续的 n 行中,每行包含六个整数 x\u003csub\u003e1\u003c/sub\u003e、y\u003csub\u003e1\u003c/sub\u003e、z\u003csub\u003e1\u003c/sub\u003e、x\u003csub\u003e2\u003c/sub\u003e、y\u003csub\u003e2\u003c/sub\u003e 和 z\u003csub\u003e2\u003c/sub\u003e,用空格分隔。坐标的绝对值不超过 10\u003csup\u003e6\u003c/sup\u003e,z 坐标的绝对值不超过 500。\n\u003cbr\u003e\n\u003cbr\u003e"}},{"title":"输出","value":{"format":"HTML","content":"对于每个测试用例,你应该在一行中输出“Case a: b”。其中,a 表示案例编号,b 表示宝库的最小体积。案例编号从一开始计数。\n\u003cbr\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\n1\n0 0 0 5 6 4\n3\n0 0 0 5 5 5\n3 3 3 9 10 11\n3 3 3 13 20 45\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 0\nCase 2: 8\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}