Http://mathforum.org/library/drmath/view/52343.htmlMod function and negative numbers
Date: 04/28/2000 at 11:17:09From: AnneSubject: Using the mod() function with negative numbersI work in IT - Technical Support. I am trying to sort out a problem for
Ant
Time
limit: 1 Second
Memory Limit: 32768 KB
There is an ant named Alice. Alice likes going hiking very much. Today, she wants to climb a cuboid. The length of cuboid ' s longest edge n is, and the other
Problem DescriptionAs we know, sequence in the form of an=a1+ (n−1) d are called arithmetic progression and sequence in the form of bn=b1qn−1 (q& gt;1,b1≠0) is called geometric progression. Huazheng wants to use these the simple matrix of sequences
Topic linksGive two number n, M. to find the value of n%1+n%2+.......+n%m.First, n%i = N-n/i*i, then the original conversion is N*m-sigma (I:1 to M) (N/i*i).Then we can find 1/4 = 2/4 = 3/4 = 0, 4/4 = 5/4 = 6/4 = 7/4 = 1. So you can divide these
Test instructions: There are n numbers, n-1 operators, the order of each operator can be arbitrary, so there is a total (n-1)! Order of operations, get (N-1)! The results of these operations and the MOD 1e9+7.Analysis:The position K of the last
The first thought of violence DP is the number of days as a dimension so there is no way to optimize, matrix fast power is also $o (n^3) $ will explode.But there is no other transfer equation: the definition of $f[i][j]$ represents a $i$ day with a
Test instructions: BC Round 72 Chinese NoodleAnalysis (official):If you learn Dirichlet convolution, you know that this thing is g (n) = (f*1^k) (n),As a result of the binding law, so we quickly power a 1^k on the line.Of course, the force of the
After study, we can find that each person's contribution is C (n-2,k-1) +c (n-3,k-1) ... C (k-1,k-1)Also note that the plus sign is all on the left.A template for O (n) preprocessing O (1) combination numbers is also used here. It's wonderful.
Title Link: http://acm.hdu.edu.cn/showproblem.php?pid=6333Tips for solving problems:
This problem can be said to be very wonderful, first push combinatorial mathematical formula, one of the most important formula is CNm = Cmn-1 + Cm-1n-1 This
This problem is a mathematical problem, by the title, m stable number of the way is CNMThen the book is left N-m, because the book numbered I cannot be placed in the I position, so its method number should be determined by the wrong row formula,
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.