Question 1:
What is the smallest positive integer x that makes x ^ x reach or exceed n digits? N <= 2*10 ^ 9
Problem solving process:
1. I have seen this question before. The number of digits of a number x = (INT) lg (x) + 1 is changed to Ln (X)/ln (2) + 1; then only one minimum X is required to meet Ln (X)/ln (2) + 1> = N;
2. Considering that ln (X)/ln (2) + 1 is monotonic increasing, we can solve the problem quickly as long as binary X is used.
Question 2:
Give n ordered queues and find the minimum m of all numbers. N, m <= 10 000
Problem solving process:
1. This question was also seen in the Noi guide .. Write a small root heap. At the beginning, the first element of each queue is written into the heap. Each time the top element of the heap is taken out, the next element of the corresponding queue is pushed into the heap .. I reviewed the heap again.
Question 3:
Multiply a matrix of a x B by a matrix of B x C to obtain a matrix of a X c. the time complexity is a x B x C. Matrix Multiplication satisfies the combination Law (but does not satisfy the exchange law ). Returns the size of N matrices in sequence. How long does it take to calculate the product of N matrices. N <= 100
Problem solving process:
1. This is the bare interval DP, Which is simpler than the merge of stones .. The specific implementation can be done by merging stones.
1 model (5) day2