Here it is the LOJ a comprehensive solution to a problem on the brush through the subject, is not updated regularly. Specific update policy poke here .
If the subject is relatively simple, the it will be briefly explained roadmap , and according to specific needs, pseudo-code is given, the whole paste link code or not to code. Little or no comment.
If there is a more difficult subject of thinking, then we will explain in detail the problem solving process , and then give pseudo-code or post links to the full code. Fewer notes.
If the subject are more code amount, then it will roughly explain the policy, but focuses on explaining implementation , given post direct links to the full code or paste the full code. More comments.
If the subject of both the difficulty of thinking, but also the amount of code, then I will explain in detail the problem-solving process, and explain the implementation , given paste the full link code or directly paste the full code. More comments.
Above, it is noted. But always clarify the meaning of the questions brief, time complexity analysis and so on. And if the content is really too much, branch problem solution will be considered.
If it can solve level data to strengthen the case, and will make every effort to strengthen the data speak. Strengthen data indicate a greater level of my program can be achieved.
LOJ # 10000. "1.1 cases through a 1" activity schedule
Briefly meaning of the questions: Given a number of left and right opening and closing section , Seeking the largest number of intervals so that they twenty-two no intersection.
Obviously, with array will sort these intervals, then section taken at the end of the recording time (initially ).
From small to large to take, if we can take, then , and updates .
time complexity: . Data strengthening: . Actual score: .
LOJ # 10001. "1.1 cases through a 2" trees
Briefly meaning of the questions: there requirement, i.e. each request interval planted tree. Seeking to meet the minimum number of trees of all kinds of conditions.
Obviously, the structure ordered in the end storage requirements. Then, as many trees at the end of the interval , as this may lead to a greater contribution to the back of the range.
time complexity: . Actual score: .
Strengthen data: , the maintenance process by planting tree line, there are many details.
LOJ # 10002. Sprinklers "1.1 cases through a 3"
Briefly meaning of the questions:
Given a lawns and printheads, each nozzle in the center line, from left m, watering range m. It requires at least the entire nozzle Watering lawns.
Still, with storage, to calculate the current Watering nozzleleftmost position and the rightmost position.
Then, according to LOJ # 10000. "1.1 cases through a 1" campaign scheduled ideas to solve.
Note judgment case.
time complexity: . Actual Score: .
LOJ # 10003. "4 1.1 cases through a" process of production scheduling
Briefly meaning of the questions:
products are in 、 two processing workshop, and must be in plant to be processed after processing workshop. Seeking the order of processing such that the minimum time.
Obviously for two items , Then before processing, otherwise first processing.
This sort, then you can count it again.
time complexity: . Actual Score: .
Strengthen data: , .