自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 hdu---5234

DescriptionToday is Gorwin’s birthday. So her mother want to realize her a wish. Gorwin says that she wants to eat many cakes. Thus, her mother takes her to a cake garden. The garden is splite

2016-08-23 15:35:55 191

原创 poj---1064

DescriptionInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It wa

2016-08-23 10:45:00 337

原创 关于堆和栈

堆和栈的区别 一、预备知识—程序的内存分配 一个由C/C++编译的程序占用的内存分为以下几个部分 1、栈区(stack)— 由编译器自动分配释放 ,存放函数的参数值,局部变量的值等。其 操作方式类似于数据结构中的栈。 2、堆区(heap) — 一般由程序员分配释放, 若程序员不释放,程序结束时可能由OS回 收 。注意它与数据结构中的堆是两回事,分配方式倒是类似于链表,呵

2016-08-19 16:39:15 139

原创 构造器与方法区别

我们说构造器是一种方法,就象讲澳大利亚的鸭嘴兽是一种哺育动物。(按:老外喜欢打比喻,我也就照着翻译)。要理解鸭嘴兽,那么先必须理解它和其他哺育动物的区别。同样地,要理解构造器,那么就要了解构造器和方法的区别。所有学习java的人,尤其是对那些要认证考试的,理解构造器是非常重要的。下面将简单介绍一下 ,最后用一个表作了些简单的总结。 功能和作用的不同构造器是为了创建一个类的实例。这个

2016-08-19 16:30:20 186

原创 LightOJ 1030

DescriptionYou are in a cave, a long cave! The cave can be represented by a 1 x N grid. Each cell of the cave can contain any amount of gold.Initially you are in position 1. Now each turn you th

2016-08-19 14:58:41 264

原创 序列中增序列的最大个数

#include#include#include#includeusing namespace std;#include#define N 10009int a[N];int fun(int a[], int len){    int Max=0;    int temp=1;    int key;    for(int i=0;i   

2016-08-18 19:31:46 248

原创 CodeForces 702A

DescriptionYou are given array consisting of n integers. Your task is to find the maximum length of an increasing subarray of the given array.A subarray is the sequence of consecutive elements o

2016-08-18 19:30:05 220

原创 CodeForces 670A

DescriptionOn the planet Mars a year lasts exactly n days (there are no leap years on Mars). But Martians have the same weeks as earthlings — 5 work days and then 2 days off. Your task is to deter

2016-08-18 19:22:21 232

原创 POJ----3061

DescriptionA sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal le

2016-08-18 19:20:13 279

原创 关于 栈和堆

DescriptionACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(. As a smart ACMer, you want to get ACboy ou

2016-08-18 14:05:40 159

原创 数据结构关于二分查找,Qsort

(一)二分法查找二分法查找其实就是折半查找,一种效率较高的查找方法。针对有需数组来查找的。主要思想是:(设查找的数组期间为array[low, high])(1)确定该期间的中间位置K(2)将查找的值T与array[k]比较。若相等,查找成功返回此位置;否则确定新的查找区域,继续二分查找。区域确定如下:a.array[k]>T 由数组的有序性可知array[k,k+1,……,h

2016-08-18 09:52:48 222

原创 LightOJ 1104

DescriptionSometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose you are in a party where there are 23 people including you. What is

2016-08-14 10:51:44 231

原创 HDU----1155

DescriptionOnce again, James Bond is fleeing from some evil people who want to see him dead. Fortunately, he has left a bungee rope on a nearby highway bridge which he can use to escape from his e

2016-08-14 10:44:52 141

原创 UVA____10200

这个就是一个简单的素数判断,然后就是求a, b之间素数存在的概率不知道为什么就是最后概率后面要+1e-8可能即使double精确度吧#include#include#include#include#includeusing namespace std;#define N 11000int f[N];int q(long long m){    i

2016-08-14 10:32:40 146

原创 HDU----5461水题

DescriptionGiven the sequence  with  integers . Given the integral coefficients  and . The fact that select two elements  and of  and  to maximize the value of , becomes the largest point.

2016-08-11 20:45:39 163

原创 HDU---2802

Description Giving the N, can you tell me the answer of F(N)?InputEach test case contains a single integer N(1OutputFor each test case, output on a line the value of th

2016-08-11 20:21:45 224

原创 HDU----2955

DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided to work i

2016-08-11 20:07:45 142

原创 zznuli--1909

Description小火山和他的朋友岩浆, 分别打算去买商店买一些东西。小火山的起始位置为(X1, Y1),终止位置为(X2, Y2), 速度为U;岩浆的起始位置为(X3, Y3), 终止位置为(X4, Y4), 速度为V, 双方一块出发, 到达终止位置后, 都会在终止位置停留。 现在小火山想知道他和岩浆在此过程中的最小距离。Input输入第一行是一个整数

2016-08-11 10:17:15 163

原创 CodeForces 500A

DescriptionNew Year is coming in Line World! In this world, there are n cells numbered by integers from 1 to n, as a 1 × n board. People live in cells. However, it was hard to move between disti

2016-08-05 21:07:34 199

原创 HDU----1686

DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair no

2016-08-05 19:51:23 134

原创 HDU----1083

DescriptionConsider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible to form a committee of exactly P s

2016-08-05 14:15:17 116

原创 HDU1231最大的连续序列和

Description给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{ Ni, Ni+1, ..., Nj },其中 1 例如给定序列{ -2, 11, -4, 13, -5, -2 },其最大连续子序列为{ 11, -4, 13 },最大和 为20。 在今年的数据结构考卷中,要求编写程序得到最大和,现在增加一个要求,即还需要输出该 

2016-08-04 20:02:43 179

原创 简单DP

DescriptionJesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go back h

2016-08-04 20:01:05 161

原创 调和级数求和

DescriptionIn mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers:In this problem, you are given n, you have to find Hn.InputInput s

2016-08-04 19:59:15 1342

原创 简单

DescriptionSVM(Support Vector Machine)is an important classification tool, which has a wide range of applications in cluster analysis, community division and so on. SVM The kernel functions used i

2016-08-04 16:09:08 162

原创 斐波那契数列,大数据

DescriptionYou will be given a string which only contains ‘1’; You can merge two adjacent ‘1’ to be ‘2’, or leave the ‘1’ there. Surly, you may get many different results. For example, given 1111

2016-08-04 13:44:47 432

原创 河南多校大一训练赛

DescriptionYour karate club challenged another karate club in your town. Each club enters N players into the match, and each player plays one game against a player from the other team. Each game t

2016-08-03 18:45:54 310

原创 POJ1287——————networking

DescriptionYou are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may con

2016-08-03 08:54:11 332

原创 多校

Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面

2016-08-02 15:22:29 146

原创 不知道

DescriptionGiven a code (not optimized), and necessary inputs, you have to find the output of the code for the inputs. The code is as follows:int a, b, c, d, e, f;int fn( int n ) {    if( n 

2016-08-02 14:19:55 168

原创 金字塔

DescriptionYou are in the world of mathematics to solve the great "Monkey Banana Problem". It states that, a monkey enters into a diamond shaped two dimensional array and can jump in any of the ad

2016-08-02 13:18:01 144

原创 POJ---1062昂贵的聘礼

Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币

2016-08-01 19:33:33 152

原创 OpenJ_Bailian 4118

Description北大信息学院的同学小明毕业之后打算创业开餐馆.现在共有n 个地点可供选择。小明打算从中选择合适的位置开设一些餐馆。这 n 个地点排列在同一条直线上。我们用一个整数序列m1, m2, ... mn 来表示他们的相对位置。由于地段关系,开餐馆的利润会有所不同。我们用pi 表示在mi 处开餐馆的利润。为了避免自己的餐馆的内部竞争,餐馆之间的距离必须大于k。请你帮助小明选择一

2016-08-01 09:08:28 173

空空如也

空空如也

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

TA关注的人

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