Ultraviolet A 10359 Tiling

Uva_10359 If we make f (n) the number of placement types when n columns exist, we may consider how to place the first position on the left. Actually there are three cases, so we can get F (n) = f (n-1) + 2 * F (n-2 ). Import Java. Math.

Poj 1329 circle through three points

Poj_1329 The question is mainly about finding out the outer heart of the triangle, that is, the point of the vertical line in each side. After the formula is derived, it can be calculated directly. # Include # Include String . H># Include #

Poj 2954 triangle

Poj_2954 The core of this question is the pick theorem: The given vertex coordinates are simple polygon of the entire point. The Area A and the number of internal points I and the number of edge points B satisfy the following requirements: A = I +

Poj 2975 Nim

Poj_2975 Assume that one heap has y stones, and the nim of the other heap stones is X, because x ^ x = 0 and x ^ K! = 0 (K! = X), so only when y> X is taken away from Y-x stones can the total Nim be 0. # Include # Include String . H> # Define

HDU 3480 Division

Hdu_3480 First, a greedy idea is that if we sort the elements in order, we must select a continuous interval, because if we select two values, in this case, you can select any value between two values. This will not change the cost of this range.

HDU 3308 lcis

Hdu_3308 This question can be done using a line segment tree. The longest lcis in a range is either in the left son, right son, or in the middle. Single-point update operations are relatively easy to write, because there is no range limit, you

Poj 3255 roadblocks

Poj_3255 I was thinking about poj_2449.AlgorithmTle, it seems that only a * can be solved. Due to the short circuit, the K of the K short circuit is 2, which is relatively small. Therefore, you can directly use dij. My idea is to create a

Poj 1106 Transmitters

Poj_1106 First, we can remove vertices other than circles. Later, we first thought of calculating the angle between the enumeration diameter and the x-axis. However, the accuracy is not guaranteed, and it is difficult to calculate, So we refused.

Poj 1704 Georgia and Bob

Poj_1704 This is a classic staircase Nim game, which was mentioned in Wang Xiaoke's "Analysis of A Class of combinations. If we regard the number of adjacent pawns between the leftmost pawns and the wall as the number of coins on each step, it

Sgu 115 calendar

Sgu_115 The date-like problem seems to be more clear by writing a few small functions. # Include # Include String . H> Int Days [] = { 0 , 31 , 28 , 31 , 30 , 31 , 30 ,31 , 31 , 30 , 31 , 30 , 31 }; Int M = 10 , D = 21 , W = 7 ; Int Equals ( Int

Poj 1755 triathlon

Poj_1755 At first, I thought it was necessary to enumerate three routes, but after I thought about it, I only needed to enumerate two routes, because I could regard the total distance as a fixed value and set it to INF. In this way, for

How Many Trees?

UVA_10303 Set f [I] to indicate the number of binary search trees when there are a total of I elements, then we take 1-n as the root, then we will get f [n] = f [0] * f [n-1] + f [1] * f [N-2] +... + F [n-1] * f [0]. If we perform a ing of f [n] =

UV 10169 Urn-ball Probabilities!

UVA_10169 This question can obviously pre-process the results and then use them for reference. It is not difficult to calculate the formula. When calculating the number of 0, we use a conversion like X = 10 ^ (log10 (X), so we only need to

Ultraviolet A 310 L-system

UVA_310 Generally, the answers that LRJ selects but have so few solve rates are probably trick. I wrote them once a few months ago, and only WA, TLE, And RE are handed in. I wrote another note today, and the result was unexpectedly AC, so I cannot

UV 254 Towers of Hanoi

UVA_254 At first, I found the wrong question. I didn't do it according to the requirements of the question. If I do it according to the algorithm described in the question, the result of moving n to an even number is the same as what we normally do,

POJ 1724 roanalyticdb

POJ_1724 This topic can directly convert dis [] In SPFA into a two-dimensional dis [I] [k], which indicates the shortest path when the I point cost is k, however, if SPFA is directly implemented, a pruning request is required. If mind [I] is set, it

POJ 1229 Wild Domains

POJ_1229 This topic may feel like dp, but it is difficult to transfer the status. What makes it difficult? And! The restrictions are too cumbersome. In fact, if it is a matching character, it is best to deal with one configuration and one

POJ 3691 DNA repair

Poj_1_1 This topic can be directly dp in the "Security" section of the generated trie graph. When f [I] [j] is used to represent step I to step j, at least several genes are repair. For more information about how to create a trie graph, see the

POJ 1265 Area

POJ_1265 The core of this question is the Pick theorem: The given vertex coordinates are simple polygon of the entire point. The Area A and the number of internal points I and the number of edge points B satisfy the following requirements: A = I + B/

POJ 1061 frog appointment

POJ_1061 According to the question, you can get (x + k * m) % L = (y + k * n) % L, so there is x + k * m = y + k * n + t * L, and the moving item is L * t-(n-m) * k = x-y, at this time, there are two unknown numbers, t and k, and our goal is to

Total Pages: 64722 1 .... 27331 27332 27333 27334 27335 .... 64722 Go to: GO

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.