Feat: add new Markdown parser (#39800)
and change all the challenges to new `md` format.
This commit is contained in:
committed by
GitHub
parent
a07f84c8ec
commit
0bd52f8bd1
@ -1,52 +1,39 @@
|
||||
---
|
||||
id: 5900f53d1000cf542c510050
|
||||
challengeType: 5
|
||||
title: 'Problem 465: Polar polygons'
|
||||
challengeType: 5
|
||||
forumTopicId: 302140
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
# --description--
|
||||
|
||||
The kernel of a polygon is defined by the set of points from which the entire polygon's boundary is visible. We define a polar polygon as a polygon for which the origin is strictly contained inside its kernel.
|
||||
|
||||
For this problem, a polygon can have collinear consecutive vertices. However, a polygon still cannot have self-intersection and cannot have zero area.
|
||||
|
||||
For example, only the first of the following is a polar polygon (the kernels of the second, third, and fourth do not strictly contain the origin, and the fifth does not have a kernel at all):
|
||||
|
||||
|
||||
|
||||
Notice that the first polygon has three consecutive collinear vertices.
|
||||
|
||||
Let P(n) be the number of polar polygons such that the vertices (x, y) have integer coordinates whose absolute values are not greater than n.
|
||||
|
||||
Note that polygons should be counted as different if they have different set of edges, even if they enclose the same area. For example, the polygon with vertices [(0,0),(0,3),(1,1),(3,0)] is distinct from the polygon with vertices [(0,0),(0,3),(1,1),(3,0),(1,0)].
|
||||
Note that polygons should be counted as different if they have different set of edges, even if they enclose the same area. For example, the polygon with vertices \[(0,0),(0,3),(1,1),(3,0)] is distinct from the polygon with vertices \[(0,0),(0,3),(1,1),(3,0),(1,0)].
|
||||
|
||||
For example, P(1) = 131, P(2) = 1648531, P(3) = 1099461296175 and P(343) mod 1 000 000 007 = 937293740.
|
||||
For example, P(1) = 131, P(2) = 1648531, P(3) = 1099461296175 and P(343) mod 1 000 000 007 = 937293740.
|
||||
|
||||
Find P(713) mod 1 000 000 007.
|
||||
</section>
|
||||
Find P(713) mod 1 000 000 007.
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
# --hints--
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
tests:
|
||||
- text: <code>euler465()</code> should return 585965659.
|
||||
testString: assert.strictEqual(euler465(), 585965659);
|
||||
`euler465()` should return 585965659.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler465(), 585965659);
|
||||
```
|
||||
|
||||
</section>
|
||||
# --seed--
|
||||
|
||||
## Challenge Seed
|
||||
<section id='challengeSeed'>
|
||||
|
||||
<div id='js-seed'>
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler465() {
|
||||
@ -57,17 +44,8 @@ function euler465() {
|
||||
euler465();
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
## Solution
|
||||
<section id='solution'>
|
||||
# --solutions--
|
||||
|
||||
```js
|
||||
// solution required
|
||||
```
|
||||
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user