# Heyawacky: Ace of Cups

This is a Heyawacky puzzle. The rules are the same as Heyawake, but non-rectangular regions are allowed.

Rules of Heyawake:

• Shade some cells of the grid.

• There cannot be a horizontal or vertical line of unshaded cells that passes through two borders.

• If a number is in a room, there must be exactly that many shaded cells in that room.

(The reason this genre is given a different name is the third rule: in regular Heyawake, it is often phrased as "line of unshaded cells that is in at least three rooms" rather than "that passes through two borders". That phrasing is equivalent if all rooms are rectangular, but not necessarily if there are nonrectangular rooms.)

• So for the rooms with no number in them, does that count as $0$ i.e. no shaded cells in those particular rooms? +1 incidentally :) – Feeds Aug 16 at 17:34
• @Feeds Pretty sure the lack of a number means "unknown" here. – jafe Aug 16 at 17:43
• @Feeds jafe is right - if there's no number in a room, you don't know how many shaded cells there are. – Deusovi Aug 16 at 17:51
• Thanks guys... but I guess I wasn't clever enough to solve the puzzle ;) – Feeds Aug 17 at 12:35

First of all, the upper three rows of the cup all have to be blocked by a shaded cell either inside the cup or directly adjacent to it. Since there can only be one shaded cell on the left and one on the right, one row must have a shaded cell inside the cup. So we know the bottom two rows of the cup are empty, and so are the remaining cells of the regions on the left and on the right.

We also know that the 1 in the rightmost column has to have a shaded cell on the same row as the 1 directly left of the cup. So there are only three possibilities where it can be. Mark the others as empty.

There's now a stretch of empty cells containing one border and ending at another. The end point must be shaded.

The cell on the immediate left of the base of the cup cannot be shaded, because shading it would force an illegal situation.

Since the base of the cup cannot be restricted from the left, we have to do it by shading the cell on its immediate right. This forces the cell up and to the right of it to be shaded as well.

The third row of the cup cannot be blocked from the right, because we'd end up in an illegal situation.

Since that cell is empty, the cell above it must be shaded.

This leaves one way to complete the 1 to the right, leading to the resolution of the 1 on the far left and the 1 on the far right.

Both sides next to the narrow part of the cup need to be shaded because of empty cells above and below them.

We need to shade a cell near the top-right corner because of the empty cells below.

In the square near the bottom-right corner, we need to shade one cell because of the empty cells above.

The same situation occurs in the square directly to the right of that one.

These squares cannot both be empty, because we would need to have two adjacent shaded cells above them. That means the one shaded cell needs to be one of these two.

After we mark the remaining cells inside that 1 empty, we see that the fourth cell of the bottom row must be shaded.

There is only one way to fill in the corner now, since we need to keep the unshaded cells continuous. The other way would shut off the corner from the rest of the unshaded cells.

The first cell of row 2 must be shaded because of the empty cells below it.

One of the cells on row 2 must be shaded, so we know cell 3 of row 1 must be empty, blocked from the right. Only one way to fill in the corner now.

Regardless of where the shaded cell is in the 1 in the bottom-right corner, the corner cell needs to be shaded. After shading that, there is only one possibility to complete the 1 without shutting out the unshaded cells.

• That's correct, and exactly the intended logic - nicely done! – Deusovi Aug 16 at 23:20

I believe this is the solution:

Unfortunately I (1) didn't keep a record of my reasoning and (2) am already late for dinner, but my first step -- which made a lot of progress -- was

to note that there's a 3x2 block near the top right that has to contain at least two of the three filled-in squares permitted to the three regions it intersects, so that two of those regions must have no squares filled in anywhere else; two of the three ways to pick the two rapidly lead to contradictions.