mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-02 14:12:17 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定两条线段(表示为起点<code>start = {X1, Y1}</code>和终点<code>end = {X2, Y2}</code>),如果它们有交点,请计算其交点,没有交点则返回空值。</p>\n\n<p>要求浮点型误差不超过<code>10^-6</code>。若有多个交点(线段重叠)则返回 X 值最小的点,X 坐标相同则返回 Y 值最小的点。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>\nline1 = {0, 0}, {1, 0}\nline2 = {1, 1}, {0, -1}\n<strong>输出:</strong> {0.5, 0}\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>\nline1 = {0, 0}, {3, 3}\nline2 = {1, 1}, {2, 2}\n<strong>输出:</strong> {1, 1}\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>\nline1 = {0, 0}, {1, 1}\nline2 = {1, 0}, {2, 1}\n<strong>输出:</strong> {},两条线段没有交点\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>坐标绝对值不会超过 2^7</li>\n\t<li>输入的坐标均是有效的二维坐标</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 76,
|
||||
"likes": 77,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"10.1K\", \"totalSubmission\": \"22.9K\", \"totalAcceptedRaw\": 10070, \"totalSubmissionRaw\": 22872, \"acRate\": \"44.0%\"}",
|
||||
"stats": "{\"totalAccepted\": \"10.1K\", \"totalSubmission\": \"22.9K\", \"totalAcceptedRaw\": 10076, \"totalSubmissionRaw\": 22886, \"acRate\": \"44.0%\"}",
|
||||
"hints": [
|
||||
"所有的线都会相交吗?什么决定两条线是否相交?",
|
||||
"无限长的线几乎总会相交,除非它们相互平行。平行线也仍然有可能“相交”——如果它们是同一条线。这对线段来说意味着什么?",
|
||||
|
Reference in New Issue
Block a user