Y by
There are 6 squares in a row. Each one is labeled with the name of Ana or Beto and with a number from 1 to 6, using each number without repetition. Ana and Beto take turns painting each square according to the order of the numbers on the labels. Whoever paints the square will be the person whose name is on the label. When painting, the person can choose to paint the square either red or blue. Beto wins if at the end there are the same number of blue squares as red squares, and Ana wins otherwise. In how many of all the possible ways of labeling the squares can Beto ensure his victory?
The following is an example of a labeling of the labels.
![[asy]
size(12cm);
draw((0,0)--(6,0)--(6,-1)--(0,-1)--cycle);
for (int i=1; i<6; ++i) {
draw((i,0)--(i,-1));
}
for (int i=1; i<6; ++i) {
draw((i,0)--(i,-1.25));
}
draw((0,0)--(6,0)--(6,-1.25)--(0,-1.25)--cycle);
for (int i=1; i<7; ++i) {
draw((i-0.5,-1)--(i-0.5,-1.25));
}
label("Ana", (0.25, -1.125));
label("Beto", (1.25, -1.125));
label("Ana", (2.25, -1.125));
label("Beto", (3.25, -1.125));
label("Ana", (4.25, -1.125));
label("Beto", (5.25, -1.125));
label("1", (0.75, -1.125));
label("3", (1.75, -1.125));
label("5", (2.75, -1.125));
label("2", (3.75, -1.125));
label("4", (4.75, -1.125));
label("6", (5.75, -1.125));
[/asy]](//latex.artofproblemsolving.com/e/e/5/ee5df72b487bc558ac8c6868671fd5aa5ee7e412.png)
First Ana paints the first square, then Beto paints the fourth square, then Beto paints the second square, and so on.
The following is an example of a labeling of the labels.
![[asy]
size(12cm);
draw((0,0)--(6,0)--(6,-1)--(0,-1)--cycle);
for (int i=1; i<6; ++i) {
draw((i,0)--(i,-1));
}
for (int i=1; i<6; ++i) {
draw((i,0)--(i,-1.25));
}
draw((0,0)--(6,0)--(6,-1.25)--(0,-1.25)--cycle);
for (int i=1; i<7; ++i) {
draw((i-0.5,-1)--(i-0.5,-1.25));
}
label("Ana", (0.25, -1.125));
label("Beto", (1.25, -1.125));
label("Ana", (2.25, -1.125));
label("Beto", (3.25, -1.125));
label("Ana", (4.25, -1.125));
label("Beto", (5.25, -1.125));
label("1", (0.75, -1.125));
label("3", (1.75, -1.125));
label("5", (2.75, -1.125));
label("2", (3.75, -1.125));
label("4", (4.75, -1.125));
label("6", (5.75, -1.125));
[/asy]](http://latex.artofproblemsolving.com/e/e/5/ee5df72b487bc558ac8c6868671fd5aa5ee7e412.png)
First Ana paints the first square, then Beto paints the fourth square, then Beto paints the second square, and so on.