Files
gikf f93acf28a6 fix(curriculum): clean-up Project Euler 261-280 (#42905)
* fix: clean-up Project Euler 261-280

* fix: typo

* fix: typo

* fix: typo
2021-07-24 09:09:54 +02:00

1.3 KiB
Raw Permalink Blame History

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f47c1000cf542c50ff8e Problem 270: Cutting Squares 5 301920 problem-270-cutting-squares

--description--

A square piece of paper with integer dimensions N×N is placed with a corner at the origin and two of its sides along the $x$- and $y$-axes. Then, we cut it up respecting the following rules:

  • We only make straight cuts between two points lying on different sides of the square, and having integer coordinates.
  • Two cuts cannot cross, but several cuts can meet at the same border point.
  • Proceed until no more legal cuts can be made.

Counting any reflections or rotations as distinct, we call C(N) the number of ways to cut an N×N square. For example, C(1) = 2 and C(2) = 30 (shown below).

ways to cut 2x2 square, counting reflections and rotations as distinct

What is C(30)\bmod {10}^8 ?

--hints--

cuttingSquares() should return 82282080.

assert.strictEqual(cuttingSquares(), 82282080);

--seed--

--seed-contents--

function cuttingSquares() {

  return true;
}

cuttingSquares();

--solutions--

// solution required