数学
文章平均质量分 87
二分查找
这个作者很懒,什么都没留下…
展开
-
UVA10790 How Many Points of Intersection?
How Many Points of Intersection? We have two rows. There are a dots on the toprow andb dots on the bottom row. We draw line segments connecting every dot on the top row with every dot on原创 2014-07-16 15:10:50 · 486 阅读 · 0 评论 -
uvalive2222(等差序列前n项求和)
题意:有n个点,每个点高度不一样但一定要在0以上;而且除了头尾两个点.任意点的高度是前后两个点相加除以2 再减1;给出最左端的A点高度;求最右端的B点高度最低多少;思路:首先由任意点的高度是前后两个点相加除以2 再减1;我们可以的出;两个线段的长度差一定是2;那么我们就可以用等差序列求和来做;a1 * n + n * (n - 1) * d /2 (原创 2015-04-22 16:27:48 · 749 阅读 · 0 评论 -
UVA 305 Joseph
Joseph The Joseph's problem is notoriously known. For those who are not familiar withthe original problem:from amongn people, numbered 1, 2, ..., n, standing in circle every mthis going原创 2014-07-15 10:43:44 · 435 阅读 · 0 评论 -
UVA573 The Snail
The Snail A snail is at the bottom of a 6-foot well and wants to climb to the top.The snail can climb 3 feetwhile the sun is up, but slides down 1 foot at night while sleeping.The snail ha原创 2014-07-14 19:52:53 · 438 阅读 · 0 评论 -
UVA107 The Cat in the Hat
The Cat in the Hat Background(An homage to Theodore Seuss Geisel) The Cat in the Hat is a nasty creature,But the striped hat he is wearing has a rather nifty feature. With one flic原创 2014-07-14 20:05:58 · 620 阅读 · 0 评论 -
UVA10499 The Land of Justice
Problem HThe Land of JusticeInput: standard inputOutput: standard outputTime Limit: 4 secondsIn the Land of Justice the selling price of everything is fixed all over the country. Nobody原创 2014-07-14 20:03:22 · 590 阅读 · 0 评论 -
UVA10161 Ant on a Chessboard
Problem A.Ant on a Chessboard Background One day, an ant called Alice came to an M*M chessboard. She wanted to go around all the grids. So she began to walk along the chessboard according to原创 2014-07-14 19:44:25 · 455 阅读 · 0 评论 -
UVA846 Steps
Steps One steps through integer points of the straight line. The length of a step must be nonnegative and can be by one bigger than, equal to, or by one smaller than the length of the prev原创 2014-07-14 19:57:29 · 671 阅读 · 0 评论 -
UVA591
水题,要把所有高度移成一样的,只要计算原创 2014-07-23 22:01:44 · 458 阅读 · 0 评论 -
UVA113
算开更。用double 可以。AC代码:原创 2014-07-23 21:51:39 · 780 阅读 · 0 评论 -
UVA621
水题,判断一下输入数字的格式原创 2014-07-23 21:55:28 · 462 阅读 · 0 评论 -
UVA10970 Big Chocolate
Mohammad has recently visited Switzerland. As he loves his friends very much, he decided to buy some chocolate for them, but as this fine chocolate is very expensive(You know Mohammad is a little BIT原创 2014-07-16 15:46:45 · 654 阅读 · 0 评论 -
UVA10177 (2/3/4)-D Sqr/Rects/Cubes/Boxes?
Problem J (2/3/4)-D Sqr/Rects/Cubes/Boxes?Input: standard input Output: standard output Time Limit: 2 seconds You can see a (4x4) grid below. Can you tell me how many squares and rectang原创 2014-07-16 15:33:32 · 577 阅读 · 0 评论 -
UVA10014 Simple calculations
Simple calculations The ProblemThere is a sequence of n+2 elements a0, a1, , an+1 (n i 1000). It is known thatai = (ai1 + ai+1)/2 ci for each i=1, 2, ..., n. You are given a0, a原创 2014-07-16 16:00:23 · 503 阅读 · 0 评论 -
UVA10719 Quotient Polynomial
Problem BQuotient PolynomialTime Limit2 SecondsA polynomial of degree n can be expressed asIf k is any integer then we can write:Here q(x) is called the quotien原创 2014-07-16 15:24:03 · 526 阅读 · 0 评论 -
UVA11044 Searching for Nessy
Searching for Nessy The Loch Ness Monsterisa mysterious and unidentified animal said to inhabit Loch Ness, a large deep freshwaterloch near the cityof Inverness in northern Scotland. Nes原创 2014-07-16 15:12:11 · 463 阅读 · 0 评论 -
hdu5365(几何)
题意:给出n个整数点坐标,问构成正多边形的方法有几种;思路:因为整数点能构成的正多边形只有正四边形;所以四层for判断正四边形就行;#include #include int x[25], y[25];int square(int x){ return x * x;}int dis(int a, int b){ return squ原创 2015-08-23 20:59:59 · 486 阅读 · 0 评论