HDU-4342-history repeat itself-pure mathematical questions

Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4342 # Include # include typedef _ int64 ll; ll N, sum, num; int t; ll getnum () {num = (2 * n + 1) + SQRT (4 * n + 1)/2; for (ll I = num; I> = 1; I --) {if (I-(LL) SQRT (I) = N & (double) (SQRT

HDU 4391 line segment tree

Good God. The solution report says it is a hash. I remember someone told me that a chunk can be used as a line segment tree, but it is a little more complex .... I used a line segment tree ...... At the beginning, I wrote RT 1. After a while, I

HDU-4347-The closest M points-KD tree

What is the KD tree? I don't know. Let's talk about it !!! # Include # include # include # include using namespace STD; const int maxn = 50010; const int maxk = 5; const int maxm = 10; int n, m, K; struct point {int P [maxk]; inline void

HDU 3641 God binary has wood

Ask for the smallest X number M! X! % M = 0; Solution: Store the number of all prime numbers and prime numbers of M. Binary X. For each m, the qualitative factor p, X! The number of P must be greater than or equal to the number of M quality

BNU graceful prime decomposition memory-based search

Divide N into the form of prime number addition. The prime number must be smaller than K and the prime number cannot appear continuously. The order of prime numbers is different in addition. Given N, K, are there several ways to add prime numbers?

Acm hdu 1010 tempter of the bone

At the beginning, there was no pruning in the violent DFS search. Then we found that we needed to perform odd-even pruning. Http://www.cnblogs.com/zhourongqing/archive/2012/04/28/2475684.html Very detailed, even if you determine whether the

Scheduling of pipeline jobs

Question: I feel a little bit, but I still want to think about it. I will watch it later .... Descriptionn jobs {1, 2 ,........., N} processing should be completed on the assembly line consisting of M1 and M2 machines. The processing sequence

HDU-4344-mark the rope-big number Decomposition

Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4344 Note that the selected interval length (L) must be less than the length of the rope (N) and greater than 1. Therefore, 1 cannot be obtained. Then, if n is a prime number, the answer should be 0;

Euler's function evaluate

Int Oula (int x) {int I, Res = x; for (I = 2; I 1) RES = Res/x * (x-1); Return res ;} # Define Nmax 3000010 # define nnum 291_int flag [Nmax], prime [nnum]; int Plen; void mkprime () {int I, j; memset (flag,-1, sizeof (FLAG); for (I = 2,

BFS topic hdu1242 rescue

Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 1242 The only difference in BFS is that point X can be stuck. The method adopted this time is different from the previous method for processing X points. Note vis [] [] records whether to access

Cf 219e parking lot line segment tree

The empty tag is 1. Two operations. Park your car in the farthest place from the nearest car on both sides. If there are two positions, the output position is smaller. The car with ID leaves the parking lot. Question preparation process:

BFS topic HUD 1429 victory (continued)

Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 1429 It was a little difficult to do it for the first time. After all, it was not long before we got into BFs. Two points worth learning 1. record the state of the 10 keys, that is, the state of vis []

Before the HDU 3397 line segment tree, the suffix blhblah sequence operation

Question:A series with the length of n (n Insert operation:0 a B: change the number of all [a, B] ranges to 0.1 a B: change the number of all [a, B] ranges to 1.2 a B returns the number of all [a, B] intervals to different values or a bit (0-side 1,

HDU-4338-simple path-cut point & dual connection

Turn from cold incense: Ghost (the question is where you can't stay ). First of all: http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4338It's easy to scale the ring to a point, just do it. However, when I draw another picture, I will find some

CF-223b-Question

Http://www.codeforces.com/problemset/problem/223/ B: Mother string, child string. Any letter before 'A' in the parent string must be a letter before 'A. Q: Are letters in each parent string valid? Solution: I understand that the earliest position in

Recent Point-to-Point Template

# Include # include # include # include # include using namespace STD; const int n = 100005; const double max = 10e100, EPS = 0.00001; typedef struct tagpoint {Double X; Double Y; int indx;} Point; point A [n], B [N], c [N]; int Merge (point P [

Zoj 3363 line segment tree maintains the maximum value Alice's present

Alice's present Question: Give you a string composed of N numbers, and ask m whether there are the same numbers between the number a and the number B. If not, output "OK ", if yes, the number of the earliest duplicates appears on the rightmost side

Cf idea special offer! Super price 999 bourles!

Find the maximum number of 9 at the end of a certain range. It is very difficult (first, find the maximum number of 0, one minus, O ). Add one at a time and then subtract one at a time. # Include # include # include # include # include #

HDU 4394 digital square Memory search

Legend has it that this is DFS, but it is actually the pruning of brute-force search + not brute-force search. For example, if our n = 21, we start from single digit 1, 1*1 = 1, 9*9 = 81, and their single digit is 1, then, the numbers 1 and 9 can be

HDU 4373 combined mathematics

Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4373 Ah, multi-school questions. It seems like a very simple mathematical problem, but I cannot think of it during the competition. Today I am determined to do it. Ah, I thought it was a simple

Total Pages: 64722 1 .... 40924 40925 40926 40927 40928 .... 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.