自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 UVa, 536 Tree Recovery

Tree Recovery Little Valentine liked playing with binary trees very much. Her favoritegame was constructingrandomly looking binary trees with capital letters in the nodes.This is an exam

2013-10-16 12:36:15 1151

原创 UVa, 10701 Pre, in and post

Problem F - Pre, in and postTime Limit: 1 secondA common problem in data structures is to determine the traversal ofa binary tree. There are three classic ways to do it:Pre-order: You must vis

2013-10-16 12:31:48 1485

原创 Network UVa, 315

Network A Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 toN. No two places have the same numb

2013-10-09 19:13:09 646

原创 UVa, 10452 Marcus

Marcus, help!Input: standard inputOutput: standard outputTime Limit: 2 Seconds"First, the breath of God.Only the penitent man will pass.Second, the Word of God,Only in the footsteps

2013-10-09 19:08:11 815

原创 binary search

Binary search ( v.begin (),v.end(),3,function)二分法查找// binary_search example#include      // std::cout#include     // std::binary_search, std::sort#include        // std::vector bool myfu

2013-10-05 10:05:03 1067

原创 UVa, 10450 World Cup Noise

#includeusing namespace std;int main(){    int n,i,m,times;    long long a[51];    a[1]=2;    a[2]=3;    for(i=3;i    {        a[i]=a[i-2]+a[i-1];    }    cin>>n;    for(

2013-10-05 09:59:37 618

原创 UVa, 580 Critical Mass

Critical Mass During the early stages of the Manhattan Project, the dangers of the new radioctive materials were not widely known. Vast new factory cities were built to manufacture uranium

2013-10-05 09:56:11 671

原创 UVa, 900 Brick Wall Patterns

Brick Wall PatternsIf we want to build a brick wall out of the usual size of brick which has a length twice as long as its height, and if our wall is to be two units tall, we can make our wall in

2013-10-05 09:54:08 706

原创 UVa, 11000 Bee

Problem A: Bee The ProblemIn Africa there is a very special species of bee. Every year, the female bees of such species give birth to one male bee, while the male bees give birth to on

2013-10-05 09:52:36 918

原创 UVa, 10327 Flip Sort

Flip Sort Sorting in computer science is an important part. Almost every problem can be solved effeciently if sorted data are found. There are some excellent sorting algorithm which has al

2013-10-05 09:50:11 852

原创 UVa, 10107 What is the Median?

What is the Median? The ProblemMedian plays an important role in the world of statistics. By definition, it is a value which divides an array into two equal parts. In this problem you are

2013-10-05 09:48:17 1029

原创 UVa, 10041 Vito's Family UVa, 10041

Problem C: Vito's family Background The world-known gangster Vito Deadstone is moving to New York. He has a very big family there, all of them living in Lamafia Avenue. Since he will

2013-10-05 09:46:50 651

原创 ID CodesFrom:UVa, 146

ID CodesFrom:UVa, 146 ID Codes It is 2084 and the year of Big Brother has finally arrived, albeit a century late. In order to exercise greater control over its citizens a

2013-10-02 17:56:21 599

原创 Train Swapping From:UVa, 299

Train SwappingFrom:UVa, 299 Train Swapping At an old railway station, you may still encounter one of the last remaining ``train swappers''. A train swapper is an employee

2013-10-02 17:54:10 638

转载 stack of flapjacks uva 120

UVa OJ 120 - Stacks of Flapjacks (烙饼叠)Time limit: 3.000 seconds限时:3.000秒 Background背景Stacks and Queues are often considered the bread and butter of data structures and find use in arch

2013-10-02 16:42:14 982 1

原创 sort的用法

sort的用法:详细见cplusplus。1.默认的sort函数是按升序排。对应于1)sort(a,a+n);   //两个参数分别为待排序数组的首地址和尾地址2.可以自己写一个cmp函数,按特定意图进行排序。对应于2)例如:// sort algorithm example#include // std::cout#include

2013-10-02 14:54:06 576

空空如也

空空如也

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

TA关注的人

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