00:01
So we have this grid here.
00:02
And what we're going to do is going to place buildings with one, two, three, or four floors in each of these cells so that no two buildings in a row or column have the same number of floors.
00:13
It's almost like a sudoku.
00:15
And in addition, the number of visible buildings as we're reviewed from certain directions need to be a certain dollar.
00:24
So for example, there's a one here, there's a two here, there's a three here, and.
00:32
And there's a two over here.
00:34
What that means is from this spot, you only can see one building.
00:39
Whereas here, you only should be able to see two buildings, two buildings from this direction, and three buildings from this direction.
00:44
And something to know is if you have a one story floor, or a one floor building, that's shorter than a two floor building like this.
00:52
And then likewise, a three floor building is like this.
00:57
And then, of course, a four floor building.
01:02
Here's a three floor building and then a four floor building would be like right here like this and something to know about this is that a four floor if you're standing here let's say this is the person staying here well they couldn't see the other two buildings because this force would be blocking it but if you had say and we're going to use this as an example let's say you had the four the four building four floor building here let's say you had the two and then the one here and then you had the three floor building and you're standing here well from this direction you could see this first one which is three and the fourth one here so you can see a total of two buildings but you can't see the two or the one so that's what these numbers are and then we're also told to figure out a and b and one of the number of floors in the buildings in these cells ab and we're supposed to write that and it's part of solution.
02:09
All right, so let's go ahead and tackle this.
02:10
So i started here with one.
02:12
So if this is a one, that means you should only be able to see one building.
02:16
And the only way that could work is if this is a four, four building.
02:19
And then you'd have some combinations of two, three or ones over here.
02:23
Down here, here, you only need to, you can only see two buildings.
02:30
And so if we use this as an example, this first one could be a three.
02:38
And then this one would need to be a four, but we can't do that because then you have these are in the same columns so that doesn't work.
02:52
So but you could still have a three here but you can move the four to here and then this would be like a one or a two.
03:00
So let's say this is a two and that's a one.
03:02
See now this from this view you can only see the two billion of the four and the three.
03:06
And here the one can only see the fours, so we're good there.
03:09
And then here we need to be able to see three...