Poj 3233 matrix power series evaluate S = a + A2 + A3 +... + AK.

Please:S=A+A2 +A3 +... +AK. First timeCode: Binary direct recursion, which is easy to understand. 1250 Ms # Include # define size (1 The second code: Quickly calculate the power of a Matrix directly. But it's still 719 Ms. #

Poj 2909 Goldbach's Conjecture (x = p1 + p2)

Question: godebach's conjecture. Any even number> = 4 can be written as the sum of two prime numbers. That is, x = p1 + p2. Returns the logarithm of x and P1 and P2. # Include # include # include using namespace STD; # define Max 32768int P

Poj 2689 prime distance (translation method)

Given a range, evaluate the difference between any two adjacent prime numbers in this range and output the maximum and minimum values. Question: 1 = 1000000 in space constraints, You can first translate [L, u] to [0, u-L + 1]. Then use the

HDU 2222 keywords search)

Question: Question: // Call preprocess () first to initialize // insert () to add the find () search string // get (char S) returns the serial number corresponding to character S (Character Set combination may be 'A'-'Z' or "acgt") // call BFS

Poj 1006 biorhythms Chinese Remainder Theorem/Extended Euclidean

First watch video: http://v.youku.com/v_show/id_XMTExNTAzOTIw.html  # Include int main () {int P, E, I, D; int num, CNT = 1; while (scanf ("% d", & P, & E, & I, & D) {If (D =-1) break; num = (5544 * P + 14421 * E + 1288 * I-d) % 21252; If (Num

Poj 1365 prime land integer Decomposition

Question: Record the minimum factor of each number in the Process of prime number. A [n] indicates the minimum factor of N, for example, a [2] = 2, a [12] = 3, A [16] = 2 ······ # Include # include # include # include using namespace STD;

New Year Fun cards (01 backpack + recording path)

[Problem description] During the Chinese New Year, the favorite activity of the adults was playing cards. Xiaomengxian does not play cards, so he has to sit and watch. On this day, when a group of people played cards, they suddenly shouted:

HDU 1695 GCD rejection principle + Euler

Question: Give you five numbers: A, B, C, D, K, so that X can [a, B], y can [c, d]. Determine how many pairs (x, y) can make gcd (x, y) = K. All A and B are equal to 1. Question: 1. B/= K, D/= K, then convert it to the number of mutual elements

Poj 3176 cow bowling DP

Same as the number of towers, calculate the maximum value.Question: # Include using namespace STD; # define n 355int DP [N] [N], num [N] [N]; int max (int A, int B) {return A> B? A: B;} int main () {int N, I, j; // freopen ("a.txt", "r", stdin);

Poj 1458 common subsequence dp (LCS)

Question: finding the largest public subsequenceQuestion:When I = 0 or J = 0, C [I] [J] = 0When I, j> 0; xi = Yi, C [I] [J] = C [I-1] [J-1] + 1When I, j> 0; Xi! = Yi, C [I] [J] = max {C [I] [J-1], C [I-1] [J]} #include #include using namespace

Poj 1080 human gene functions dp (LCS)

Each base pair has a given value, '-' and each base also sets a given value. There are now two DNA sequences with different lengths. For shorter lengths, you can insert '-' to align them with longer lengths. Obtain the maximum value of the two DNA

Poj 3252 round numbers numerical statistics

If the number of values in the binary form of A number is no less than 1, this number is called the round number. Now, enter two integers start, finish and calculate the number of round numbers between the two numbers. # Include # include # define

Poj 2635 pick-up sticks (intersection of line segments)

Some people like to take a stick to the ground. The latter may cover the front and the last one may not be squashed, ask for all the sticks that are not pressed by other sticks. Question: normalize the intersection. Optimized with a linked list. Of

Assemblyinfo. CS file Parameters

The configuration file assemblyinfo. CS is mainly used to set some parameters of the generated assembly-related general information DLL file. The following describes the content of the default assemblyinfo. CS file. // Whether the public language

History (History) command usage: 15 examples

History (History) command usage: 15 examplesIf you often use Linux Command lines, using the history (History) command can effectively improve your efficiency. This article describes the 15 Use Cases of the History command.Use histtimeformat to

Codeforces beta round #97 (Div. 2)

E. Zero-onetime limit per test 2 secondsMemory limit per test 256 megabytesInput Standard InputOutput Standard output Little Petya very much likes playing with little Masha. Recently he has stored ed a game called "Zero-One" as a gift from his

Poj 2826 an easy problem ?! (Intersection of line segments)

The maximum area of rain that can be mounted on two boards. Note that the rain falls vertically. Problem: You must consider multiple situations. # Include # include # define EPS 1e-8 # define zero (x)> 0? (X):-(x) EPS;} int same_side (point P1,

Use vbs to automatically log on to multiple hi-tech accounts

Recently, due to work, you need to log on to multiple hi, so you have found the relevant script for execution. The Code is as follows: Set Ws = Createobject ("wscript. Shell ")WS. Run "CMD/c: \ Users \ chenzijun \ appdata \ software_link \

Fork () Understanding and simple Concurrent Server Applications

The author shallway posted one comment on 2nd 08,201 0. First, I think there are two confusing points: 1. The fork () function does not create a new process,CopyThe current process. 2. The fork () function is shared and executed. There are two

HDU 1231 maximum continuous subsequence (DP)

Problem descriptionGiven K integer sequences {N1, N2,..., nk}, any continuous subsequences can be represented as {Ni, Ni + 1 ,..., NJ}, where 1 For example, for a given sequence {-2, 11,-4, 13,-5,-2}, its maximum continuous subsequence is {11,-4, 13}

Total Pages: 64722 1 .... 56264 56265 56266 56267 56268 .... 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.