#P8770. [蓝桥杯 2022 省 A] 填空问题

[蓝桥杯 2022 省 A] 填空问题

Problem Description

This problem consists of two tasks, A and B.

Task A: Paper Cutter

Problem Description

Xiao Lan has a paper cutter. Each time, he can cut one sheet of paper into two halves along a straight line.

Xiao Lan prints 66 QR codes in a layout of 2 rows and 3 columns on one sheet of paper. It takes at least 9 cuts to separate them. One possible cutting method is shown in the figure below.

In the example above, Xiao Lan’s printer cannot print all the way to the edges, so the margins must be cut at least 44 times. Also, Xiao Lan can only cut one sheet at a time; he cannot overlap multiple sheets or piece them together to cut.

If Xiao Lan wants to print 440440 QR codes in a layout of 2020 rows and 2222 columns on one sheet of paper, what is the minimum number of cuts he needs?

Answer Submission

This is a fill-in-the-blank question. You only need to compute the result and submit it. The result is an integer. When submitting, write only this integer; any extra content will result in no score.

Task B: Rat Extermination Pioneer

Problem Description

Rat Extermination Pioneer is a board game suitable for all ages. Two players take turns.

The board can have various sizes. In this task, the game is played on a board with 2 rows and 4 columns. The rules are as follows: players alternate turns. On each turn, a player may choose either to place one piece on an empty cell, or to place two pieces on two consecutive empty cells in the same row. After placing pieces, the player who makes the board completely filled loses the game.

Xiao Lan and Xiao Qiao play the game. Xiao Lan goes first, and Xiao Qiao goes second. Xiao Lan has many ways to place pieces. After rotation and flipping, they correspond to the following four cases:

X000 XX00 OXOO OXXO
0000 0000 0000 0000

Here, O means a cell on the board is empty, and X means that a piece has already been placed in that cell.

For each of the four cases above, assuming both Xiao Lan and Xiao Qiao play with optimal strategy, can Xiao Lan win? If Xiao Lan wins, output V; otherwise, output L. Submit the results of the four cases concatenated in order.

Answer Submission

This is a fill-in-the-blank question. You only need to compute the result and submit it. The result is a string of length 44 consisting of uppercase letters V and L, such as VVLL. When submitting, write only this string; any extra content will result in no score.

Input Format

The input is one uppercase letter indicating which task it is.

Output Format

Output the answer corresponding to the given task label.

Hint

Answer template (for reference):

#include<iostream>
using namespace std;
int main() {
    string ans [] = {
        "The answer of task A", // Replace the content in quotes with the answer for task A
        "The answer of task B", // Replace the content in quotes with the answer for task B
    };
    char T;
    cin >> T;
    cout << ans[T - 'A'] << endl;
    return 0;
}

Translated by ChatGPT 5