The first reason is that the gap is too big. 6 questions, 7 questions, or even AK... Orz!
A: simple question. It is to simulate that process. The encoding capability is not good, so it is very slow.
B. This gbx tells me the meaning of the question, and then tries it using the brute force method, TLE. Later, I thought of the position where the records appear at most 0 consecutive points, and adjusted the sequence from this position.
C. Sorting. I directly use sort, which is very slow. Later BBM said that vector can be used.
D. I personally think it is DP. Later, gbx said that the number of Catalan would be okay if I set a formula. I said how to spend so many seconds... Alas, number theory!
More questions and more competitions. You can't just keep the status, but you need to think about how to improve your training plan and understand it in depth.Algorithm, Consolidate the review... Sdut acmer, come on!