Back
Close
  • 12

What will I learn?

String manipulation2D array

Statement

 Goal

You have to solve a puzzle box for babies with an altitude of H and a length of W, with a piece. Print "FULL" if it is possible to solve the box with the piece.

INFORMATION:
1.box:
* '#': The box.
* '.': Holes.

2.piece:
* '#': The piece.
* '.': Nothing.
* You can rotate the piece (or equivalently the box), but not flip it over.

RULES:
If the piece fits with the holes in the box AND the box is full, print "FULL" else "HOLE".
Input
Background:
Line 1: H height
Line 2: W width
Next H lines: row string

Piece:
Line 1: H2 height
Line 2: W2 width
Next H2 lines: row string
Output
"HOLE" if the piece does not fit or the square is not full, "FULL" otherwise.
Constraints
0 < H, W, H2, W2 < 64
Example
Input
4
4
####
#..#
#..#
####
4
4
....
.##.
.##.
....
Output
FULL
Solve it

A higher resolution is required to access the IDE

codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants