{"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在ACM/ICPC比赛中经常会出现许多几何问题。现在,我也为这次期末考试准备了一个几何问题。根据许多ACMer的经验,几何问题总是令人头疼的,但这个问题非常简单,毕竟我们现在参加的是考试,不是比赛 :)\u003cbr\u003e给定N(1≤N≤100)条线段,请输出所有交点的数量。如果M(M\u003e2)条线段在同一点相交,则应重复计算。\u003cbr\u003e\u003cbr\u003e注意:\u003cbr\u003e可以假设两条线段不会在多于一个点相交。\u003cbr\u003e\u003c/div\u003e"}},{"title":"输入","value":{"format":"HTML","content":"输入包含多个测试用例。每个测试用例首先包含一行一个整数N(1≤N≤100),然后是N行。每行描述一条线段,包含四个浮点数x1、y1、x2、y2,分别表示线段端点的坐标。\u003cbr\u003e以0开头的测试用例终止输入,这个测试用例不需要处理。\u003cbr\u003e"}},{"title":"输出","value":{"format":"HTML","content":"对于每个测试用例,输出交点的数量,每个测试用例占一行。\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\r\n0.00 0.00 1.00 1.00\r\n0.00 1.00 1.00 0.00\r\n3\r\n0.00 0.00 1.00 1.00\r\n0.00 1.00 1.00 0.000\r\n0.00 0.00 1.00 0.00\r\n0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n3\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}