Hunan multi-school competition (2015.4.6) CSU 1561 ~ 1569 question solution, 2015.4.6csu
A: Click to open the link.
CSU 1561 (More) Multiplication
Fill in the result of the product of two numbers at each position.
Note that the maximum size of this matrix is 1e8, so the array cannot be opened.
Simulation questions
#include B: Click the open link.
CSU 1562 Fun Ho
1320: scoop watertime limit: 2 sec memory limit: 128 MB
Submit: 494 solved: 129
[Submit] [Status] [web board]
Description
I just bought two water polo a and B today, and the capacity is 1 litre. He plans to use this water polo to play games.
First, the supervisor has prepared a water tank with an infinite capacity. At the beginning, the water tank is empty. Then, the water tank A is used to add water to the water tank, and the water tank B is used to scoop out the water tank, when using water
to point B.1 A B means that the weight of the edge of article A is changed to B.2 a B 0 C means that each edge of the path from point A to point B becomes C 2 A B 1 C indicates the each edge of the path of point A to B is added CPit point: This problem of the CSU is built with vectors on WA. There is a loophole in the standard code, which is to use ROOT[K].TOC to determine whether to update the left and right child nodes of K in the segment tree.Pro
CSU 1160Time limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld %llu DescriptionConverts a decimal integer to 16, in the form of 0x, 10~15 is represented by an uppercase letter, a~f.InputOne integer per line x,0OutputEach row outputs a corresponding eight-bit hexadecimal integer, including the leading 0.Sample Input01023Sample Output0x000000000x000003ffThis question is very ingenious, there are many solutions, here is what I wrote at the game:#i
I am dying. I have been doing this question for two days ...... Various amazing mistakes ......
This is also the question of hnu 12831.
Question:
We will give you two equal-difference series, and calculate the number of common elements in these two series.
Each series is given in the following format: n f d (representing the length, first item, and tolerances of each series respectively ).
Ideas:
First, an intersection of two series is obtained by extending Euclidean, and then the first intersec
[V] =true; - } -Ans = (ans + a[u] * d[v]% MoD)%MoD; theD[u] = (D[v] + d[u])%MoD; - }Wuyi } the - intMain () Wu { - intN, M, U, v; About while(SCANF ("%d%d", n, m)! =EOF) { $ for(inti =1; I i) { -scanf"%lld%lld", A + I, B +i); - } - init (n); A for(inti =1; I i) { +scanf"%d%d", u, v); the Add_edge (U, v); -++inch[v]; $ } the for(inti =1; I i) { the if(!inch[i]) {//0 in the degree the DFS (i); the } -
.
After finding the coordinates of the center, the next question is how to judge whether the link between the point and the center of the center is within the arc of the slice. I also used the situation to discuss it, however, there are still many cases. At the beginning, eight cases were divided, and then compressed to four cases:
Determine whether the order of the given points is clockwise or counterclockwise, then determine the direction of the range, and then determine whether the point is i
CSU 1354 Distinct Subsequences: Calculate the sum (dp) and csusubsequences of different Subsequences.
Question link: Click the open link
Description
Give a positive number, count the sum of the distinct subsequence of it, moreover, any subsequence shoshould not contain leading zeroes should t it is zero.For example, if the number is 1022, the answer is 1 + 0 + 2 + 10 + 12 + 22 + 102 + 122 + 1022 = 1293.
Input
The first line has an integerT, Means th
Question link: http://acm.csu.edu.cn/OnlineJudge/problem.php? Id = 1337
Solution Report: although the range of X and Y is 10 ^ 8, if A is greater than 1000, A ^ 3 will be greater than 10 ^ 9, in this way, there is only one 10 * C + 3 on the right of the equal sign, which can only reach 10 ^ 9 orders of magnitude. Therefore, no matter how many X and Y are input, we only need to take the range from 1 to 1000, enumerate a and B, then C can get, and then judge whether the range of C is between x and
Label: style blog color Io for SP Div on Log
1 For (Int J = 0; j
Note that if the height is the same, no matter who is standing in the queue, the two are considered only one situation: As shown in the code above, if the statistics are the same, an error will be reported, but the sample can pass through
Len [I] indicates the longest sub-sequence length that can be constructed by the first I object.
CNT [I] indicates the number of the maximum length of the largest sequence constructed by the fir
1.000000000.000000000.707106782.236067981.414213560.00000000Hint
Source
The Eighth Program Design Competition for Central South University Students
/Obtain the coordinates of A and B at the T moment, and then use the distance formula to find the distance between D = A and B. It is a binary equation about T and A is obtained based on known conditions, b, c, Judgment, the simplest way to direct1. Obtain the vertex coordinates, that is,-B/2/. If the number is greater than or equal to 0, calculate
CSU 1612: Destroy Tunnels strongly connected component Kosaraju algorithm, tunnelskosarajuLink: zookeeper
Http://acm.csu.edu.cn/OnlineJudge/problem.php? Id = 1612
Give A matrix A the size of N * N, B = A ^ 1 + A ^ 2 + A ^ 3 + .... whether non-zero items exist in A ^ n and B.
The question can be converted to N vertices numbered 1-N. For any vertices, the question goes through any step to reach u (u is any of all vertices ). In Discrete Mathematics, ma
should be from which to start adding, LRT some numbers, and then take the i,i+l ... , look at the last few not taken, and then l this value is RRT inside the beginning, how to ask for this beginning, to record how many values in the LRT node NUM[LRT], and then assume that from the I-Bit and, ((num[lrt]-(i+1))%l+l)%l, This is a description of the last few LRT node is not selected, and then L ((num[lrt]-(i+1)%l+l)%l-1 is in the RRT inside the opening position (position from 0 to L-1), so OK AH;Ma
Title Link: http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1505Test instructions: The trick is that the number of occurrences of each letter in a line of characters is different, and the word is cool.Problem-solving ideas: Look at the test instructions, combined with the case, you can understand that only need to count the number of characters in the string in the line.AC Code:#include #include#include#includeusing namespacestd;Const intm= -+5;intN,ans,a[m],b[m];CharS[m];intMain () {intN,ca=1;
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.