Training material notes-introduction & Chapter 1

Source: Internet
Author: User

 

Introduction

I bought books a long time ago. They are similar to other competition books. For competitions, there should be a lot of small mistakes, and the scope is quite wide, mainly data structures (and query sets, line segment trees, graph theory, etc ),AlgorithmDesign method (divide, greedy, etc.), there are several chapters about DP, followed by ten sets of simulation questions

Complete the study of other parts except the simulation questions before the Spring Festival

 

Chapter 1 Space-Time Analysis

 

After reading introduction to algorithms, data structure and algorithm analysis, and in-depth understanding of computer systems, this analysis cannot be called analysis. This is the characteristic of the Competition Teaching Materials: the lecture is simple and not rigorous, but it is easy to get started with because it is completely competition-oriented.

 

I gave the most example of a minimal spanning tree question, but I am confused about the data: Number of vertices <= 100000, number of edges <= 60000, the number of edges must at least be connected by a N-1 ......

 

There is also a number of p and q that satisfies the condition that X is the maximum common divisor and Y is the least common multiple. The enumeration algorithm is used to provide two simple optimization examples, however, I seem to have better practices:

P and q take X as the maximum common divisor, and Y as the minimum public multiple, P = NX, q = Mx, Mn = Q/P, obtain A1 ^ K1 * A2 * K2 by factorization Q/P ......, There are (K1 + 1) (k2 + 1 )...... To verify the correctness.

I will talk about the space complexity later, that is, don't blow up the memory. There's nothing to do. Wait and read the csapp to see what the stack is like.

Summary

WriteProgramAttention should be paid to the growth level and optimization of the gradual time, constant optimization should also be taken into account, and the test should not blow out the memory

None of the above

The second chapter of "data structure and algorithm analysis" is quite well written ...... The example is better, as is the competition book

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.