We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. All Contests
  2. ProjectEuler+
  3. Project Euler #147: Rectangles in cross-hatched grids
  4. Discussions

Project Euler #147: Rectangles in cross-hatched grids

Problem
Submissions
Leaderboard
Discussions

    You are viewing a single comment's thread. Return to all comments →

  • ravigiridhar786
    6 years ago+ 0 comments

    yes, but in a 3x2 grid there are 1 possible 3x2 grid -> 37(18 upright + 19 diagonal) 6 possible 1x1 grids -> 6(6 upright + 0 diagonal) 4 possible 2x1 grids -> 16(12 upright + 4 diagonal) 2 possible 3x1 grids -> 16(12 upright + 4 diagonal) 3 possible 1x2 grids -> 12(9 upright + 3 diagonal) 2 possible 2x2 grids ->36 (18 upright + 18 diagonal) so, total = 37 +6 + 16 + 16 + 12 + 36 = 123 out of 123, 75 =(18+9+12+12+6+18) are upright and 48= (19+4+4+3+18) are diagonal

    0|
    Permalink
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature