## 11471 - Arrange the Tiles

All about problems in Volume 114. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

andmej
Experienced poster
Posts: 158
Joined: Sun Feb 04, 2007 7:45 pm
Location: Medellin, Colombia

### 11471 - Arrange the Tiles

I can't find a way to solve this problem other than examining all possibles boards with brute force.
How to solve this efficiently? Thanks.
Runtime errors in Pascal are reported as Wrong Answers by the online judge. Be careful.

Are you dreaming right now?
http://www.dreamviews.com

Leonid
Experienced poster
Posts: 146
Joined: Thu Dec 22, 2005 5:50 pm
Contact:

### Re: 11471 - Arrange the Tiles

Take 6 elements out of 12: (12! / (6! * 6!).
You will result in 2 groups of 6 elements. Think about what information do you need from these groups in order to find a number of ways in which the groups can be connected.

andmej
Experienced poster
Posts: 158
Joined: Sun Feb 04, 2007 7:45 pm
Location: Medellin, Colombia

### Re: 11471 - Arrange the Tiles

I still haven't found the solution. Any other hint?
Runtime errors in Pascal are reported as Wrong Answers by the online judge. Be careful.

Are you dreaming right now?
http://www.dreamviews.com

Robert Gerbicz
Experienced poster
Posts: 196
Joined: Wed May 02, 2007 10:12 pm
Location: Hungary, Pest county, Halasztelek
Contact:

### Re: 11471 - Arrange the Tiles

Code: Select all

``````aaa
aaa
bbb
bbb
``````

andmej
Experienced poster
Posts: 158
Joined: Sun Feb 04, 2007 7:45 pm
Location: Medellin, Colombia

### Re: 11471 - Arrange the Tiles

Robert Gerbicz wrote:

Code: Select all

``````aaa
aaa
bbb
bbb
``````
I think that once I have split the tiles in two groups of 6, I have various ways (4!) to order rows of 3 tiles taken from the two groups, including:

Code: Select all

``````A1
A2
B1
B2``````
and

Code: Select all

``````A2
B1
B2
A1
``````
etcetera.

But if I check all of these arrangements there might be some that are legal but not counted. What to do?
Runtime errors in Pascal are reported as Wrong Answers by the online judge. Be careful.

Are you dreaming right now?
http://www.dreamviews.com

rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan

### Re: 11471 - Arrange the Tiles

You could also get AC using simple Backtrack with a little trick.

-----
Rio