自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 泰山挑夫2

A - Chips:n个人围成圈,按顺时针编号1-n,顺时针发牌,第i个人可以得到i张牌,总共m张牌,最后一次发牌时必须保证发牌着手中的牌大于将要发的人的编号,否则停止,最后发牌者手中剩几张牌。sum(n):1~n的和,m = m%sum(n);从1~n遍历sum(i)直到sum(i)>m为止,m-sum(i-1)即为结果B - Binary Number:给定01串,两种操作,如果是奇数

2013-08-10 11:24:42 601

原创 泰山挑夫1

A - Watermelon水题:将一个K千克的西瓜分成2份,每一份都是偶数的可能性。只要注意2这个特殊的点即可。   B - Before an Exam题意:Peter还有几天就考试了,他父母给他安排了一个时间表,第i天最多复习Maxi个小时,最少复习Mini个小时,Peter只记得他一用复习了Sum个小时,是否能够满足父母给他的安排!思路:求出最少时间和s1、最大

2013-08-02 19:21:21 792

原创 求凸包的周长(计算几何模板)

#include #include #include #include using namespace std;const int N = 110;const double eps = 1e-8;const double PI = 3.1415926535898;struct point{ double x,y;}s[N],t[N];bool isZero(doubl

2013-06-30 20:46:27 786

原创 无相连通图的生成树个数

通过看大神博客,总结了两种做法:解法一:基尔霍夫矩阵(暴力解法 O(n^3) 适用于n       http://www.4ucode.com/Study/Topic/1940063对于一个无向连通图,我们可以根据以下规则列出一个矩阵M:①主对角线上的值M(i,i)为i节点的度。②a[i,j]的值为点i到点j的平行边的条数的相反数,对于简单图a[i,j] = -1。显然,如果i,j不连通,M(i,

2013-06-30 20:44:50 2765

原创 Ural-1084. Goat in the Garden(计算几何)

1084. Goat in the GardenTime limit: 1.0 secondMemory limit: 64 MBSomeone has let a goat in a square kitchen-garden and had bound it to a stake. The stake is driven into the ground in the very midst

2013-06-30 20:35:11 694

原创 Ural-1044. Lucky Tickets. Easy!(简单题)

1044. Lucky Tickets. Easy!Time limit: 2.0 secondMemory limit: 64 MBBackgroundThe public transport administration of Ekaterinburg is anxious about the fact that passengers don’t like to pay for passa

2013-06-30 20:23:30 904

原创 Ural-1014. Product of Digits(简单题)

1014. Product of DigitsTime limit: 1.0 secondMemory limit: 64 MBYour task is to find the minimal positive integer number Q so that the product of digits of Q is exactly equal to N.InputThe input c

2013-06-30 20:13:31 1259

原创 Ural-1005. Stone Pile(简单01背包)

1005. Stone PileTime limit: 1.0 secondMemory limit: 64 MBYou have a number of stones with known weights w1, …, wn. Write a program that will rearrange the stones into two piles such that weight di

2013-06-30 20:05:27 1509

原创 Ural-1009. K-based Numbers(简单组合数)

1009. K-based NumbersTime limit: 1.0 secondMemory limit: 64 MBLet’s consider K-based numbers, containing exactly N digits. We define a number to be valid if itsK-based notation doesn’t contain two s

2013-06-30 19:57:04 723

原创 Ural-1083. Factorials!!!(水题)

1083. Factorials!!!Time limit: 1.0 secondMemory limit: 64 MBDefinition 1. n!!…! = n(n−k)(n−2k)…(n mod k), if k doesn’t divide n; n!!…! = n(n−k)(n−2k)…k, if k divides n (There are k marks ! in the

2013-06-30 19:44:57 544

原创 Ural-1025. Democracy in Danger(水题)

1025. Democracy in DangerTime limit: 1.0 secondMemory limit: 64 MBBackgroundIn one of the countries of Caribbean basin all decisions were accepted by the simple majority of votes at the general meet

2013-06-30 19:40:41 563

原创 Ural-1068. Sum(水题)

1068. SumTime limit: 2.0 secondMemory limit: 64 MBYour task is to find the sum of all integer numbers lying between 1 and N inclusive.InputThe input consists of a single integer N that is not greate

2013-06-30 19:35:50 695

原创 Ural-1001. Reverse Root(水题)

1001. Reverse RootTime limit: 2.0 secondMemory limit: 64 MBThe problem is so easy, that the authors were lazy to write a statement for it!InputThe input stream contains a set of integer numbers Ai (

2013-06-30 19:10:45 810

原创 Ural-1020. Rope(简单计算几何)

1020. RopeTime limit: 1.0 secondMemory limit: 64 MBPlotters have barbarously hammered N nails into an innocent plane shape, so that one can see now only heads. Moreover, pursuing their m

2013-06-29 18:49:50 742

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除