HUAWEI OD machine test - crossword guessing

The first word guessing game

Title description:

Xiao Wang designed a simple word guessing game. The puzzle of the game is a wrong word, such as new, and the player needs to guess the correct word in the puzzle library. The requirements for guessing are as follows:
For a certain riddle and answer word, satisfying any of the following conditions means guessing:
1. The same after changing the order, for example, by changing the order of w and e, "nwes" and "news" can be Exactly corresponding;
2. The letters are the same after deduplication. For example, "woood" and "wood" are the same. After deduplication, they are both "wod". Please write a
program to help find the correct answer in the answer library.
There are multiple words in the riddle, and you need to find the corresponding answer. If you can’t find it, return " not found "
. Description A list of correct words to match, separated by "," If not found, return "not found"




The second question is to rent a car and ride the greenway

topic description

The department organizes green island cycling team building activities. Rent public tandem bicycles for riding, each bicycle can seat up to two people, and carry a large load M.
Given the weight of each person in the department, what is the maximum number of tandem bicycles that can be rented.
Input
the two numbers m and n in the first line, the bicycle weight limit m, representing the total number of people in the department n.
The second line, eight numbers, represents each person's weight. The weight is less than or equal to the bicycle weight limit m.
0<m<=200
0<n<=1000000
output
The minimum number of tandem bicycles required

Guess you like

Origin blog.csdn.net/weixin_40650522/article/details/129767675