自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 2012 ACM-ICPC Asia Changchun Regional Contest - K:Yukari's Birthday

Today is Yukari's n-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday cake! But it's a big challenge for them to placen candles on the top of th

2012-10-18 20:38:01 1642

原创 2011 Asia Beijing Regional B:Hou Yi's secret

Long long ago, in the time of Chinese emperor Yao, ten suns rose into the sky. They burned the crops and scorched the bushes and trees, leaving the people with nothing to eat.Hou Yi was the grea

2012-10-18 20:16:55 1740

原创 HDU 2440、HDU 3694多边形费马点

费马点是指求到N个点距离和最小的点。通常要求的是简单多边形的费马点。1、http://acm.hdu.edu.cn/showproblem.php?pid=2440   按照题意知道是一个简单的多边形即凸包,但给出的点并没有按照顺序的,所以需要自己先求出凸包,然后在用随机淬火求费马点。#include#include#include#include#include#include

2012-10-12 16:24:56 3499

原创 ZOJ 3645 :BiliBili _高斯消元

Shirai Kuroko is a Senior One student. Almost everyone in Academy City have super powers, andKuroko is good at using it. Her ability is "Teleporting", which can make people to transfer in the eleven

2012-10-11 19:50:26 1147

原创 旋转卡壳解决一类问题(程序)——未完待续

1、旋转卡壳求凸多边形直径(即求平面点集最远点对)http://poj.org/problem?id=2187   本题数据较水,可以直接暴力#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace

2012-10-10 21:23:10 640

转载 旋转卡壳解决一类问题(资料)

以下所有文章均转载( http://blog.csdn.net/acmaker/article/details/3176910) 转载请注明出处!1、旋转卡壳——翻译说明文档  前一段时间看了一位国外大牛的网站,是关于旋转卡壳技术的,内容很不错,就尝试着翻译一下。     关于旋转卡壳技术,最早是在刘汝佳、黄亮的《算法艺术与信息学竞赛》上看到的,是计算几何相关的技术,开始觉得很

2012-10-10 21:10:17 2120

原创 一类凸包题目(未完)

注:《黑书》P392中有讲:对于通常求的凸包,输出的凸包是包括所有可能的共线点还是不包括任何共线点(即只有极点)这是取决于题目的题目要求的。在下面的程序中都会将去共线点的代码加上,视题目删除。1、http://poj.org/problem?id=1113   简单凸包,求凸包的周长和圆周Graham-Scan 算法#include#include#include#i

2012-10-08 20:17:27 747

原创 HDU 4291:A Short problem_成都赛区网络赛—矩阵快速幂

Problem Description  According to a research, VIM users tend to have shorter fingers, compared with Emacs users.  Hence they prefer problems short, too. Here is a short one:  Given n (1 18), Y

2012-09-17 19:54:40 1790

原创 2012 Multi-University Training Contest 9__Farmer Greedy和Quadrilateral

Problem Description  Farmer Greedy is going to buy some houses for his farm. He has money only to buy three houses. The three houses can from a triangle area, which he can own as his farm.  Ther

2012-08-22 20:43:23 684

原创 POJ 2398:Toy Storage _叉积性质

DescriptionMom and dad have a problem: their child, Reza, never puts his toys away when he is finished playing with them. They gave Reza a rectangular box to put his toys in. Unfortunately, Reza is

2012-08-20 19:20:09 597

原创 UVA - 10650 :Determinate Prime

Description Determinate PrimeInput: standard inputOutput: standard outputTime Limit: 1 second If three or more consecutive primes are uni-distance they are called Determinate Primes.

2012-08-16 14:58:46 809

原创 2012 Multi-University Training Contest 7:Palindrome graph

Problem DescriptionIn addition fond of programing, Jack also loves painting. He likes to draw many interesting graphics on the paper.One day,Jack found a new interesting graph called Palindrome

2012-08-15 20:31:58 563

原创 UESTC 1721:吴神,人类的希望_n个相同的球放进m个相同的盒子的问题

Description公元18906416年,由于歌者无节制的使用二向箔,整个宇宙都将不可避免的跌入二次元。为了拯救学弟们,吴神决定使用一种叫smxrwzdx的基本粒子创造一个新的宇宙,吴神发现,用不同数量的smxrwzdx可以组合成不同的粒子,比如用两个smxrwzdx就可以组成一个魔理沙,三个smxrwzdx就可以组成一个洛天依,总之,无论怎样组合,都会产生一个好的结果(不要吐槽,吴神就是

2012-08-14 14:30:22 8377 1

原创 2012 Multi-University Training Contest 3:Triangle LOVE_判断有向图中是否含有仅由三个点组成的环

ains a single integer t (1 For each case, the first line contains one integer N (0 In the next N lines contain the adjacency matrix A of the relationship (without spaces). Ai,j = 1 means i-th peop

2012-08-13 20:10:04 1948 1

原创 2012 Multi-University Training Contest 3:Arcane Numbers 1

Problem DescriptionVance and Shackler like playing games. One day, they are playing a game called "arcane numbers". The game is pretty simple, Vance writes down a finite decimal under base A, and

2012-08-13 19:43:42 547

原创 SPOJ—Paying in Byteland

DescriptionThere are infinitely many coin denominations in the Byteland. They have values of 2^i for i=0,1,2,... . We will say that set of coins c1,c2,...,ck is perfect when it is possible to pay

2012-08-10 21:48:38 1265

原创 SPOJ Equation :求 1/n!=1/x+1/y 的解的个数

DescriptionYou are given integer positive number N. Find the number of solutions in positive integer numbers of the following equation:1/N! = 1/X + 1/YInputEach line of input fil

2012-08-10 20:14:21 3213

原创 SPOJ Primitive Root :判断一个数模p的阶是否是p-1

DescriptionIn the field of Cryptography, prime numbers play an important role. We are interested in a scheme called "Diffie-Hellman" key exchange which allows two communicating parties to ex

2012-08-10 10:39:46 1683

原创 SPOJ :Use of Function Arctan

DescriptionIt's easy to know that arctan(1/2)+arctan(1/3)=arctan(1).The problem is,to some fixed number A,you have to write a program to calculate the minimum sum B+C.A,B and C are all positive

2012-08-09 16:44:11 1152

原创 FZU 1969 GCD Extreme,UESTC 1723 吴神的大脑: _数论好题(求1-n中所有数的最大公约数之和)

Problem DescriptionGiven the value of N, you will have to find the value of G. The meaning of G is given in the following codeG=0; for(i=1;i for(j=i+1;j G+=gcd(i,j);

2012-08-09 15:20:23 8128 4

原创 2012 Multi-University Training Contest 5:Mark the Rope

Problem DescriptionEric has a long rope whose length is N, now he wants to mark on the rope with different colors. The way he marks the rope is:1. He will choose a color that hasn’t been used2

2012-08-08 20:16:35 634

原创 2012 Multi-University Training Contest 5:History repeat itself

Problem DescriptionTom took the Discrete Mathematics course in the 2011,but his bad attendance angered Professor Lee who is in charge of the course. Therefore, Professor Lee decided to let Tom

2012-08-08 19:45:36 461

原创 2012 Multi-University Training Contest 5:Xiao Ming's Hope

Problem DescriptionXiao Ming likes counting numbers very much, especially he is fond of counting odd numbers. Maybe he thinks it is the best way to show he is alone without a girl friend. The day

2012-08-08 19:18:25 794

原创 UVa 634 - Polygon:判断点在任意多边形内

Modern graphic computer programs can, among other, even more stunning capabilities, fill a closed region. Though not all of them can protect the user from accidentally choosing to fill the background

2012-08-08 10:40:42 767

原创 POJ 1584:A Round Peg in a Ground Hole _判断点是否在多边形内(5种方法)

DescriptionThe DIY Furniture company specializes in assemble-it-yourself furniture kits. Typically, the pieces of wood are attached to one another using a wooden peg that fits into pre-cut holes in

2012-08-07 09:51:19 1600 1

原创 POJ 2653:Pick-up sticks _判断两线段是否相交

DescriptionStan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that is these sticks such that

2012-08-06 18:38:06 630

原创 POJ - 3304 :Segments__判断直线和线段是否 相交

DescriptionGiven n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected segments have at

2012-08-06 16:56:08 565

原创 POJ - 1269:Intersecting Lines__判断两直线相交

DescriptionWe all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are paral

2012-08-06 15:19:07 752

转载 ACM计算几何推荐

转自http://hi.baidu.com/novosbirsk/blog/item/723a9727a9ab8804918f9dca.html其实也谈不上推荐,只是自己做过的题目而已,甚至有的题目尚未AC,让在挣扎中。之所以推荐计算几何题,是因为,本人感觉ACM各种算法中计算几何算是比较实际的算法,在很多领域有着重要的用途(例如本人的专业,GIS)。以后若有机会,我会补充、完善这个列

2012-08-06 14:32:07 2080

原创 ZOJ 1648:Circuit Board __判断两线段相交

On the circuit board, there are lots of circuit paths. We know the basic constrain is that no two path cross each other, for otherwise the board will be burned.Now given a circuit diagram, your ta

2012-08-06 14:05:12 544

原创 Developing School's Contest 2012-2 by HUT :Bet

Problem DescriptionMirko doesn’t like Latin homeworks so he made a bet with Slavko. Loser will be writing homeworks for both of them the entire month. Mirko wants to win so he designed this proble

2012-08-06 13:51:00 589

原创 UVA - 10025 :The ? 1 ? 2 ? ... ? n = k problem

The problemGiven the following formula, one can set operators '+' or '-' instead of each '?', in order to obtain a given k? 1 ? 2 ? ... ? n = k For example: to obtain k = 12 , the expression to

2012-08-06 09:23:57 1694

原创 Developing School's Contest 2012-2 by HUT :DNA-AND-DNA

Problem Description生物学家们发现了一个奇怪的DNA分子,可以将它们看作一个由集合{A,B} 中的元素组成的N个字符的序列。由于一系列的突变使得DNA链只包含A。生物学家发现这很奇怪,所以他们开始研究更详细的基因突变。他们发现了两种类型的基因突变。一种类型是改变单个字符的序列(A→B或B→A)。第二类改变了整个序列的前缀,从1到K(1和N之间)。计

2012-07-25 10:17:57 897

原创 Developing School's Contest 2012-2 by HUT :数字游戏续

Problem Description自从小艾上次在和小牛的游戏中取得了信心之后,这次他又想到了一个问题,他要去计算两个数A和B的最大公约数。由于这两个数非常的大,于是小牛把数字A拆成了N个数,这N个数相乘的结果是A,把B拆成了M个数,同样这M个数的乘积等于B,小艾迫不及待地想去计算出这两个数的最大公约数,这次你能帮帮他吗?如果结果超过了9位数,输出最后的9位数。

2012-07-25 09:57:40 801

原创 Developing School's Contest 2012-2 by HUT:数字游戏

Problem Description小艾和小牛在上数学课的时候觉得非常的无聊,于是他们想出了一个新的游戏,小牛写下N位的数字,小艾的任务就是在去除了K位后得到一个最大的数。Input输入有多组数据。第一行输入一个N和一个K( 1 接下来就是N位数字,确保输入数据中没有前导0。Output输出去除了K位后的最大数字。Sample Inpu

2012-07-25 09:48:53 870

原创 UVA - 11666 Logarithms

From time immemorial different series has been an integrated part of mathematics. Series is very important for finding values of many important functions such as sin(x), ex, ln(x) etc. The well known

2012-07-25 09:14:19 620

原创 HDU - 4302 :Holedox Eating ,线段树、树状数组+二分,优先队列

DescriptionHoledox is a small animal which can be considered as one point. It lives in a straight pipe whose length is L. Holedox can only move along the pipe. Cakes may appear anywhere in the pip

2012-07-21 10:35:52 581

原创 POJ 2777:Count Color——线段树

DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There is a very long board with length L c

2012-07-19 09:32:10 437

原创 SOJ 2325:Word Transformation _floyd

A common word puzzle found in many newspapers and magazines is the word transformation. By taking a starting word and successively altering a single letter to make a new word, one can build a sequence

2012-07-19 09:17:48 747

原创 UVA - 12475 :求椭圆的周长,精度要求很高

暑期电大组队训练赛的一题。 题意是给出椭圆的长半轴a和b,求椭圆的周长,精度要求很高!  关于椭圆周长(L)的精确计算要用到积分或无穷级数的求和.//显然直接利用积分计算太困难,而利用被转化过来的级数计算则显然方便的多。只是循环到多大级数才算最好。我参照一篇论文(但依据论文写的程序很多小数据并不能过)提供的数据      公式(8)C值  椭圆周长真值    误差率

2012-07-17 19:12:44 1222

空空如也

空空如也

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

TA关注的人

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