yaworsw/euler-manager

View on GitHub
data/problems/270.yml

Summary

Maintainability
Test Coverage
---
:id: 270
:name: Cutting Squares
:url: https://projecteuler.net/problem=270
:content: |+
  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 <var>x</var>- and <var>y</var>-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).

   ![p270_CutSquare.gif]({{ images_dir }}/p270_CutSquare.gif)

  What is C(30) mod 10<sup>8</sup> ?