2018_Blue Bridge Cup Provincial Tournament C/C++_B Group Summary

    April 1, 2018, a very unique day, April Fool's Day + Blue Bridge Cup== find yourself rubbish? ?

   

Question 1: Days

    Open the calendar directly. . . .

Question 2: Look at the characters and answer the numbers

   I forgot to convert the negative number into binary. I used a computer calculator to do it. I wrote the first one was nine, and the second one showed a small part. I didn't insist on writing it. Then found the third one was the same as the first one. I'm afraid that if the second "of" is written, it will be possible to withdraw. Sometimes a little bit of persistence is still useful.

Question 3: 0 numbers at the end of the product

    The other great gods wrote 31, but the method is not the same as theirs. They use the last non-zero number of the last number to be multiplied continuously. I seem to be 26, right? Wrong,

The great gods use factors of 2 and 5! ? A question I did a few days ago is somewhat similar to it.

Input a positive integer n, how many 0s are at the end of n! (ie factorial)? For example: n = 10; n! = 3628800, so the answer is 2
Enter description:
Input is one line, n(1 ≤ n ≤ 1000)
Output description:
Output an integer, that is, what the question requires
Input example 1:
10
Output example 1:
2

Although I know how to find the zero number at the end of the factorial, I can't change the way of saying it! ! Still don't fully understand the meaning of the question.


Question 4: Number of Tests

    I think this question should be done in a dichotomous way (although I don't quite understand what to do when testing 3 mobile phones)


Question 5: Quick Sort

    I read Quick Sort a few days ago, and I was secretly happy when I saw the title, but I was still confused when I actually wrote it. wrote quick_select(a,p+1,r,k)

    I don't understand the use of the p given in the title. Isn't the i the same? Many answers on the Internet are quick_select(a,i+1,r,k-(i-l+1)), which seems to be wrong again.    

.

Question 6: Incrementing triples

    This question was intended to be violent at the beginning. The array is too large. I wonder if I should use pruning? Just fill in the sample. No point!

.


Question 7: Spiral

    Write is written, but the large number should not pass, it will time out. There may be some rules to be found.

Eighty or ninety is not written, just fill in a sample!

    

    After doing it once, I realized that the Blue Bridge Cup is not so watery! (Maybe I am too rubbish!) I don't know if there is a third prize! I stayed up late today and reflected on it. In any case, I came to a conclusion: the algorithm is still very bad, not for any competition, but also for postgraduate entrance exams. No matter, this algorithm must be mentioned! ! I still have to go to South University! !


    

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325693607&siteId=291194637