Usaco 1.4-3.3 Problem Solving

Source: Internet
Author: User

Complete the problem.

Recently, I made a 3.3 error and decided to stop it. On the one hand, it started to involve computational ry, network flow, and other unfamiliar features.AlgorithmOn the other hand, many questions are beyond my current level, and many of them are copied by others.Program, There are three or four ways to directly submit others, so the effect is not guaranteed. The third chapter was originally planned to be completed in February. Now it seems that we have to learn more advanced algorithms and consolidate other questions. But I will kill it.

1.4

Packrec has no patience to write or even cannot be understood through simulation.

Clocks search. It turns out that BFS with hundreds of rows have timed out. After looking at the problem, simply solve the problem with DFS, you only need to consider that a clock that is converted to 90 degrees or four times will return, so you can enumerate the clock for up to four times.

Ariprog brute force enumeration, but pruning is required

Milk3 DFS.

1.5

Numtri is a classic DP question

Pprime is also enumeration + pruning. You need to construct a number of input files and then determine whether it is a prime number.

Sprime is also an enumeration. How can we judge multiple enumeration + prime numbers? It seems easier than the previous ones.

Checker's classic n queen, recursive classic example, requires pruning, you can consider symmetric cut some, I read matrix67 bit operation tutorial made

2.1

Castle has finally come to some algorithms. It's hard to fill the water, floodfill, but it's a little troublesome.

Frac1 Enumeration

The greedy solution of sort3 makes people think about how to find the minimum number of exchanges in a common sequence.

Holstein is also DFS, and the file name is always wrong ......

Hamming is also Enumeration

2.2

Preface: I am dealing with others, and it feels troublesome, but just find out the mathematical law.

The subset can use DP

Runround Enumeration

Lamps seems to involve mathematics, headaches, cheat

2.3

Prefix is also DP

Nocows tree DP

Zerosum can be used with DFS.

Money is the number of solutions for knapsack problems

Search for concom. It is not difficult to see the meaning of the question.

2.4

TTwo enumeration is enough. I thought that people could go normally.

Maze1 is also a search, and it is troublesome to process the details.

Cowtour graph Shortest Path Deformation

Comehome Shortest Path

Fracdec first round of the fractional decimal number, as long as the Division is repeated is a cycle, it was originally thought that there is a cycle in the business section, pay attention to the details

3.1

Agrinet bare MST

Inflate backpack

Humble Enumeration

Rect1 is a little difficult. If there is a rectangle floating in reverse order, divide it into several parts.

Connect is also an annoying question for cheat.

Stamps is DP. I wrote a Bt search for it in the preliminary round and asked you to fill in the blanks.

3.2

Fact4 high-precision multiplication of single precision

Kimbits clever DP Solution for final Recursion

Spin simulation, the boundary is unclear, so cheat ......

Ratios is said to be a Gaussian elimination element. I use a simulation

Msquare is BFS +, similar to octa digital. What's more, I still don't know where the two questions are wrong, so I copied them from others, hash can be used for weight determination, but it is more convenient to expand the two questions.

Use spfa for butter

3.3

Fence Euler Road

Shopping five-dimensional backpack

Camelot is a bit complex about graph. First, we need to construct a model to calculate the distance, give an example, and make a small cut. So I copied another one ......

Range is similar to a floodfill, but it is not the same. It can be solved with a clever DP.

Game1 game, which can be solved using interval DP

 

 

Then my usaco came to an end. What I was actually doing was from 1.23 to 3.24 for about two months. It seems faster, but for me, I am reading the problem translation, there are also a lot of others who have even submitted several questions, which is a waste of time.

 

Some new algorithms will be learned in the next period, including network streams, computational ry, difficult searches, some DP and other graph theories. There are a lot of things to learn, we also need to do some basic questions to consolidate hash and other knowledge. Now hash, head and other data structures are basically not used.

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.