自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 使用ProgressDialog创建进度对话框

ProgressDialog代表了进度对话框,程序只要创建ProgressDialog实例,并将它显示出来就是一个对话框。有两种方法实现。①如果只是创建简单的进度对话框,那么调用ProgressDialog提供的静态show()方法显示对话框即可.②创建ProgressDialog,然后调用方法对对话框的进度条进行设置,设置完成后将对话框显示出来即可.ProgressDialog常用方

2016-07-09 17:00:26 2022

原创 TexView中的ellipsize属性

TextView中有个ellipsize属性,作用是当文字过长时,该控件该如何显示,解释如下:1.android:ellipsize=”start”—–省略号显示在开头2.android:ellipsize=”end”——省略号显示在结尾3.android:ellipsize=”middle”—-省略号显示在中间4.android:ellipsize=”marquee”–以跑马灯的

2016-01-22 13:05:23 576

原创 Android中的消息通知Toast和Notification

1、Toast  Toast译为土司,类似切片面包,用于弹出比较快速的及时提示信息。当Toast被显示时,虽然它悬浮应用程序最上方,但是并未获得焦点。它的设计就是为了提示有用的信息,而不打扰用户其他操作。最使用简单:view sourceprint?1.1       // 第一个参数:当前的上下文环境。可用getApplicationConte

2015-11-27 20:40:53 3578

原创 android studio 中去除应用标题栏

androdi studio中去除应用标题栏     ①mainifests中设置:android:theme="@style/AppTheme"(即默认设置).       ② values->styles.xml中设置:style name="AppTheme" parent="Theme.AppCompat.Light.NoActionB①ar".

2015-11-25 20:48:53 519

转载 ViewPager 详解(一)---基本入门

转载自:http://blog.youkuaiyun.com/harvic880925/article/details/38453725  前言:这两天研究研究ViewPager滚动功能,现在很多的app都有用到这个功能,我们的大虾米也有这个模块。要研究就彻底的研究研究,我从不满足于一个功能只是简单的应用,要学就学的彻底,所以我打算将ViewPager 分几篇写,研究的哪个程度就写到哪个程度吧。今

2015-11-23 21:01:37 373

原创 Codeforces Round #315 (Div. 2)

DescriptionLittle Lesha loves listening to music via his smartphone. But the smartphone doesn't have much memory, so Lesha listens to his favorite songs in a well-known social network InTalk.Unf

2015-08-21 21:16:15 741

原创 light oj 1317

DescriptionYou probably have played the game "Throwing Balls into the Basket". It is a simple game. You have to throw a ball into a basket from a certain distance. One day we (the AIUB ACMMER) wer

2015-08-21 20:15:34 660

原创 Random Teams(Codeforces Round 273)

Descriptionn participants of the competition were split intom teams in some manner so that each team has at least one participant. After the competition each pair of participants from the same t

2015-08-21 19:51:51 677

原创 Codeforces Round #313 (Div. 2) C. Geralds Hexagon(补大三角.cpp

DescriptionGerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to. Then he measured the length of its sides, and found that e

2015-08-20 21:39:22 638

原创 概率

DescriptionAs Harry Potter series is over, Harry has no job. Since he wants to make quick money, (he wants everything quick!) so he decided to rob banks. He wants to make a calculated risk, and gr

2015-08-20 09:31:49 727

原创 hdu 1465

Description大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了! 做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。 话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,我高中的时候,就有一个神奇的女生,在英语考试的时候,竟然把40个单项选择题全部做错了!大家都学过概率论,应该知道出现这种

2015-08-19 20:31:35 794

原创 hdu 1405

DescriptionTomorrow is contest day, Are you all ready? We have been training for 45 days, and all guys must be tired.But , you are so lucky comparing with many excellent boys who have no chance

2015-08-19 15:55:29 659

原创 F - 概率(经典问题)

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 are23 people including you. What is

2015-08-18 21:48:02 829

原创 hdu 2669

DescriptionThe Sky is Sprite. The Birds is Fly in the Sky. The Wind is Wonderful. Blew Throw the Trees Trees are Shaking, Leaves are Falling. Lovers Walk passing, and so are You. .....

2015-08-18 20:09:15 883

原创 hdu 1222

DescriptionThere is a hill with n holes around. The holes are signed from 0 to n-1.A rabbit must hide in one of the holes. A wolf searches the rabbit in anticlockwise order. The

2015-08-18 08:53:50 896

原创 poj 4548

Description  小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。   问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。   给定一个区间,你能计算出这个区间内有多少个美素数吗?   Input第

2015-08-17 21:06:47 568

原创 poj 3356

DescriptionLet x and y be two strings over some finite alphabet A. We would like to transformx into y allowing only operations given below:Deletion: a letter in x is missing in y at a co

2015-08-16 19:28:55 1047

原创 light oj1074

DescriptionThe people of Mohammadpur have decided to paint each of their houses red, green, or blue. They've also decided that no two neighboring houses will be painted the same color. The neighbo

2015-08-16 18:53:23 741

原创 UVA 10453

DescriptionBy definition palindrome is a string which is not changed when reversed. "MADAM" is a nice example of palindrome. It is an easy job to test whether a given string is a palindrome or n

2015-08-15 15:00:37 623

原创 hdu 1203

DescriptionSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估计了他得到这个学校o

2015-08-14 19:39:17 621

原创 poj 1458

DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of X if there exists

2015-08-14 19:03:46 649

原创 poj 3903

DescriptionThe world financial crisis is quite a subject. Some people are more relaxed while others are quite anxious. John is one of them. He is very concerned about the evolution of the stock ex

2015-08-13 19:58:18 733

原创 hdu 2602

DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grave …T

2015-08-13 10:59:41 942

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

2015-08-12 21:54:13 552

原创 猴子吃香蕉

Description一组研究人员正在设计一项实验,以测试猴子的智商。他们将挂香蕉在建筑物的屋顶,同时,提供一些砖块给这些猴子。如果猴子足够聪明,它应当能够通过合理的放置一些砖块建立一个塔,并爬上去吃他们最喜欢的香蕉。 研究人员有n种类型的砖块,每种类型的砖块都有无限个。第i块砖块的长宽高分别用xi,yi,zi来表示。 同时,由于砖块是可以旋转的,每个砖块的3条边可以组成6种不同的

2015-08-12 11:15:58 1368

原创 hdu 1003

DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 1

2015-08-10 20:57:06 660

原创 uva 10382

n sprinklers are installed in a horizontal strip of grass l meters long and w meters wide. Each sprinkler is installed at the horizontal center line of the strip. For each sprinkler we are given its p

2015-08-09 21:47:44 1002

原创 poj 1328Radar Installation

DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation,

2015-08-09 19:08:14 512

原创 codeforece 18c

DescriptionOnce Bob took a paper stripe of n squares (the height of the stripe is 1 square). In each square he wrote an integer number, possibly negative. He became interested in how many ways exi

2015-08-09 18:54:02 691

原创 hdu 4911Inversion

Descriptionbobo has a sequence a 1,a2,…,a n. He is allowed to swap twoadjacent numbers for no more than k times. Find the minimum number of inversions after his swaps. Note: The number

2015-08-09 18:42:39 856

原创 codeforce492 B. Vanya and Lanterns

B. Vanya and Lanternstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya walks late at night along a straight street of l

2015-08-08 17:02:51 528

原创 Codeforces Round #178 (Div. 2) B .Shaass and Bookshelf

Shaass has n books. He wants to make a bookshelf for all his books. He wants the bookshelf's dimensions to be as small as possible. The thickness of thei-th book is ti and its pages' width is equal

2015-08-06 20:09:56 974

原创 uva 10020

The ProblemGiven several segments of line (int the X axis) with coordinates [Li,Ri]. You are to choose the minimal amount of them, such they would completely cover the segment [0,M]. The Inp

2015-08-05 21:16:07 448

原创 hdu 1969

PieTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 109 Accepted Submission(s): 52Problem Description

2015-08-05 09:20:01 636

原创 poj 1505

DescriptionBefore the invention of book-printing, it was very hard to make a copy of a book. All the contents had to be re-written by hand by so calledscribers. The scriber had been given a book

2015-08-04 19:19:54 1501

原创 poj 2299

Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 48121 Accepted: 17553DescriptionIn this problem, you have to analyze a particular sorting a

2015-08-03 16:19:45 464

原创 UVALive 6661

Let us consider sets of positive integers less than or equal to n. Note that all elements of a set aredi erent. Also note that the order of elements doesnt matter, that is, both f3; 5; 9g and f5; 9;

2015-07-31 21:02:13 519

原创 hdu 5224 Tom and Paper

DescriptionThere is a piece of paper in front of Tom, its length and width are integer. Tom knows the area of this paper, he wants to know the minimum perimeter of this paper. Input

2015-07-31 18:42:25 659

原创 CodeForces 556A

DescriptionAndrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containing zeros and ones.Once he thought about a string of length n consisting of

2015-07-31 18:28:47 785

原创 uva 572

Oil DepositsThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid t

2015-07-30 21:17:18 658

空空如也

空空如也

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

TA关注的人

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