自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 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 909

原创 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 815

原创 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 889

原创 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 641

原创 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 599

原创 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 453

原创 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 783

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

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

2012-07-17 19:12:44 1245

原创 SGU 441:Set Division _第二类斯特林数

DescriptionRuslan has K friends. And all of them have birthday tomorrow. He has boughtN different photo albums yesterday, and wants to present these photo albums to his friends. Of course, he

2012-07-17 10:24:16 5921 1

原创 学院OJ:1684:Light on or off __线段树 区间更新

http://220.166.52.162/oj/showproblem?problem_id=1684DescriptionThere is N lights on the wall of Dreamone’s house from left to right.Initially,some lights on and some lightsoff, and we use ‘1’

2012-07-16 22:08:49 920

原创 POJ 3468 :A Simple Problem with Integers——区间更新线段树经典题目

/*经典区间成段更新题目。题意:给出一个长度n的数字序列,已经m个操作,Q操作给出l,r:访问区间[l,r]的数字和;C操作给出l,r,x:将区间[l,r]内的所有数字都加上x。Sample Input10 51 2 3 4 5 6 7 8 9 10Q 4 4Q 1 10Q 2 4C 3 6 3Q 2 4Sample Output

2012-07-16 10:32:10 475

原创 单点更新+区间求最值与和_线段树

除了平时做练习赛外,现在主要学习数论与数据结构,数据结构丢了好久了,重新学习还是发现了很多问题!/*题意:在每个测试的第一行,是两个正整数 N 和 M ( 0学生ID编号分别从 1 编到 N。第二行包含 N 个整数(范围在 0 到 100 ),代表这 N 个学生的初始成绩,其中第 i 个数代表 ID 为 i 的学生的成绩。接下来有 M 行,每行有三个数,意思如下:先输入一个

2012-07-16 10:29:04 540

原创 TopCode SRM 546: StrllRec_字符字典序剪枝

Problem Statement  For a given string S of length n an inversion is a pair of integers (i, j) such that 0 S[j]. (That is, the character at 0-based index i is greater than the character at 0

2012-07-13 22:01:40 888

原创 HDU 1754:I Hate It_线段树

Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15372    Accepted Submission(s): 5975Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某

2012-07-11 19:50:09 481

原创 SUG 502: Digits Permutation

Time Limit: 2000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u[Submit]   [Go Back]   [Status]  DescriptionAndrew has just made a breakthrough in the world of numb

2012-07-11 19:38:25 888

原创 SGU 499:Greatest Greatest Common Divisor

Time Limit:1000MS    Memory Limit:262144KB    64bit IO Format:%I64d & %I64u SubmitStatusPractice SGU 499 DescriptionAndrew has just made a breakthrough in sociology: he realized ho

2012-07-11 19:30:49 1789

原创 SPOJ AMR11B:Save the Students_判断点是否在圆、矩形、三角形内

Hogwarts is under attack by the Dark Lord, He-Who-Must-Not-Be-Named. To protect the students, Harry Potter must cast protective spells so that those who are protected by the spells cannot be attacked

2012-07-10 21:58:50 1182

空空如也

空空如也

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

TA关注的人

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