A. Calculate Sequence
Analysis: Is the Fibonacci recursive formula, but the initial value is specified, only the 10th number, the data range and complexity are relatively small, direct write.
B. Forget the name.
It is a string of 10 characters, which requires that some characters be removed, so that the remaining length is greater than k, and the string dictionary order of the A-J is the smallest. Then need to enumerate the deleted string, 2^10 = 1024, the maximum character length of 100, so the complexity of 1024*100, in the 1s time limit can be completely, directly written.
C. Anagram multiple number
The problem seems simpler. Hey, a multiple of a number, and the length and the characters that contain exactly the same, and then the same length, then only 2-9 times the number to meet the requirements, and then determine whether the same character, the number of the largest 9999999, the total int is sufficient, direct write.
D. Construct permutation
First read test instructions, (these questions are all in English, but the description is very short, see examples are also easy to understand), that is, some locations can not place some numbers, data range MAXN = 100, time limit is 2s, with Dfs a sequence check the legitimacy is certainly not possible, because 100! , this complexity is really too high, and then consider whether there is a regular placement, so that after the rule is placed to meet the requirements, I did not think of this method, (later listen to the sister-in-law said can), and then I consider each position can only put a number, and there must be a solution, I guess is not the maximum flow of the And then drew the picture, should be able. is a number can be placed in any position, the traffic on these edges is 1, remove the input can not be placed in the case, and then add the source point to each number one edge, the traffic on these edges is also 1, and then add a meeting point, each location to the meeting point traffic is 1, and then run the maximum flow algorithm, I found a dinic template from the Internet, other algorithms should also be possible, because finally there must be a solution, that is, the maximum flow must be n, that is, the number of numbers, and then look for the position of the number, that is the number of the side of the flow from 1 to 0 edge, the other end of the vertex is the last position. The final computational complexity, the number of vertices 100*2 + 2 = 202,dinic Complexity 202 * (202 * (202 + 1)/2) = 8e6, the complexity of the answer is 100 * 100, within the 2s time limit, it is completely possible.
The code is not posted first.
INDEED2017 School Recruit Online Programming problem (NET Test) three