11151-longest palindrome

Description: calculates the longest input string length # include # include # include int N, sum; char STR [1010]; int V [1010] [1010]; int max (int x, int y) {return x> Y? X: Y;} int dp (int x, int y) {If (V [x] [Y]) return V [x] [Y]; if (x = y)

10306-e-coins

Description: I didn't understand the question at the beginning. I used to generate a number (x, y ), make x ^ 2 + y ^ 2 = s ^ 2 # include # include int V [310] [310], arr [45] [2]; int pow_two (int x, int y) {return x * x + y * Y;} int main () {//

11129-An antiarithmetic Permutation

Description: The question refers to a change in the number between 0 and n so that no sub-sequence can appear in an equidifference sequence, either 1 2 or 4 3, because 1, 2, 3, and 4, can be used to output any of them, the recursive merge method is

10245-The closest pair Problem

Description: it timed out directly at the beginning, and then changed a bit. It actually went through # include # include # define N 10010 double num [N] [2]; int main () {// freopen ("a.txt", "r", stdin); int n; while (scanf ("% d", & n )! = EOF)

What is the maximum fiber?

Calculate the number of Fibonacci numbers in the range [a, B]. Because the maximum is 100 to the power of 10, the first recursion is about 100 to the power of 10, which can reach about 480th of the Fibonacci series, therefore, use the brute force

Ultraviolet A 106-Fermat vs. Pythagoras

For a2 + b2 = c2, obtain all the three tuples (a, B, c) that meet the conditions, and output a, B, c. The number of three mutual groups and all of them from 1 to N.The number of numbers that have not been seen in the productkey, devicename, and

Ultraviolet A 10369-Arctic Network

There are s satellites, and the rest are all wireless devices (finding the maximum distance between the two radios in the remaining radio points ), the actual result is to find the length of the edge with the maximum P-S Value in the minimal

Ultraviolet A 10305-Ordering Tasks

For more information about the Topology Sorting of purebred objects, see the code in Liu rujia's getting started classic ~ The Code is as follows: For more information about the Topology Sorting of purebred objects, see the code in Liu rujia's

Ultraviolet A 10801-lift hopping

Based on the question, the number of seconds between the two floors that each elevator can reach is the weight of each edge to construct an undirected graph. Then use Dijkstra to find the shortest time. Note that each change to the elevator needs to

Ultraviolet A 11129-An antiarithmetic Permutation

I thought it was a relatively simple question. The result was that I understood the incorrect question. I thought that the question was an adjacent three numbers and the result was wa, after reading other people's code, we can see that the question

Ultraviolet A 10602-Editor Nottoobad

Greedy: starting from the first given string, each time the string with the largest matching prefix of the previous string is selected as the next string, and so on. The Code is as follows: # Include # include # include # include # include #

Ultraviolet A 10020-Minimal coverage

Basic Idea: if the target line segment is known to be [0, m], select the point with the largest value corresponding to the right endpoint from all the lines with the given left endpoint value less than the left endpoint value of the target line

Ultraviolet A 11054-Wine trading in Gergovia

Greedy, the original greedy method was to find every resident with a positive demand and search for the residents with a negative demand on both sides, it is not difficult to weigh the demand and sales volume to reduce one of them to zero. if the

Ultraviolet A 10037-Bridge

There are two optimal ways to solve the greedy problem. One is the combination of the smallest walk and the largest walk, and the other is the combination of the smallest and largest walk, certain conditions are required ~The following two data

Ultraviolet A 10670-Work ction

Greedy, as long as each step ensures that the cost of B is less than or equal to the cost of A, B will always be used; otherwise, solution A will be used to end, the only thing worth noting is that when B's solution is halved, the value of N cannot

HDU 3711 Binary Number

Binary Number Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission (s): 472 Accepted Submission (s): 313Problem DescriptionFor 2 non-negative integers x and y, f (x, y) is defined as the number of

Ultraviolet A 10596-morning walk

The question, connectivity, and degree of the pure Euler loop. Note the handling of special cases when r = 0 (this should be Not Possible )~ The Code is as follows: #include#include#include#includeint p[200+5];int find(int x){ return p[x] == x ?

Ultraviolet A 10192-Vacation

Longest Common subsequence. The Code is as follows: #include #include #include #include using namespace std;#define Maxn 102int main(){#ifdef test freopen("input.txt", "r", stdin);#endif int dp[Maxn][Maxn]; int len1, len2, cct = 0; char

Ultraviolet A 712-S-Trees

This question is really a shame. WA has done it three times and there is no check error. If someone else looks at it, it will be "S-Tree #1, it should be 1, 2, 3 ..., as a result, "S-Tree #1:" was directly pasted at the time of writing, and no data

Ultraviolet A 839-Not so Mobile

As long as the quality at the node is not 0, there will be a subtree, recursively completing all input ~ The Code is as follows: As long as the quality at the node is not 0, there will be a subtree from the very beginning, recursively complete all

Total Pages: 64722 1 .... 56422 56423 56424 56425 56426 .... 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.