chore(i8n,learn): processed translations

This commit is contained in:
Crowdin Bot
2021-02-06 04:42:36 +00:00
committed by Mrugesh Mohapatra
parent 15047f2d90
commit e5c44a3ae5
3274 changed files with 172122 additions and 14164 deletions

View File

@ -1,20 +1,26 @@
---
id: 5900f4111000cf542c50ff24
title: 问题165交叉口
title: 'Problem 165: Intersections'
challengeType: 5
videoUrl: ''
forumTopicId: 301799
dashedName: problem-165-intersections
---
# --description--
段由其两个端点唯一定义。通过考虑平面几何中的两个线段存在三种可能性段具有零点一个点或无限多个共同点。此外当两个段恰好具有一个共同点时可能是该公共点是任一段或两者的端点的情况。如果两个段的公共点不是任一段的端点则它是两个段的内点。如果T是L1和L2的唯一公共点则我们将两个段L1和L2的公共点T称为L1和L2的真实交点并且T是两个段的内点。
A segment is uniquely defined by its two endpoints. By considering two line segments in plane geometry there are three possibilities:
考虑三个段L1L2和L3L127,4412,32L246,5317,62L346,7022,40可以证实线段L2和L3具有真实的交叉点。我们注意到作为L3的终点之一22,40位于L1上这不被认为是真正的交点。 L1和L2没有共同点。因此在三个线段中我们找到一个真正的交叉点。现在让我们对5000个线段进行相同的操作。为此我们使用所谓的“Blum Blum Shub”伪随机数生成器生成20000个数字。 s0 = 290797 sn + 1 = sn×snmodulo 50515093tn = snmodulo 500为了创建每个线段我们使用四个连续的数字tn。也就是说第一个线段由下式给出t1t2t3t4根据上述发生器计算的前四个数字应该是27,144,12和232.因此第一个线段是( 27,14412,232。在5000个线段中发现了多少个不同的真实交叉点
the segments have zero points, one point, or infinitely many points in common.
Moreover when two segments have exactly one point in common it might be the case that that common point is an endpoint of either one of the segments or of both. If a common point of two segments is not an endpoint of either of the segments it is an interior point of both segments.
We will call a common point T of two segments L1 and L2 a true intersection point of L1 and L2 if T is the only common point of L1 and L2 and T is an interior point of both segments.
Consider the three segments L1, L2, and L3: L1: (27, 44) to (12, 32) L2: (46, 53) to (17, 62) L3: (46, 70) to (22, 40) It can be verified that line segments L2 and L3 have a true intersection point. We note that as the one of the end points of L3: (22,40) lies on L1 this is not considered to be a true point of intersection. L1 and L2 have no common point. So among the three line segments, we find one true intersection point. Now let us do the same for 5000 line segments. To this end, we generate 20000 numbers using the so-called "Blum Blum Shub" pseudo-random number generator. s0 = 290797 sn+1 = sn×sn (modulo 50515093) tn = sn (modulo 500) To create each line segment, we use four consecutive numbers tn. That is, the first line segment is given by: (t1, t2) to (t3, t4) The first four numbers computed according to the above generator should be: 27, 144, 12 and 232. The first segment would thus be (27,144) to (12,232). How many distinct true intersection points are found among the 5000 line segments?
# --hints--
`euler165()`应该返回2868868
`euler165()` should return 2868868.
```js
assert.strictEqual(euler165(), 2868868);