自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 杭电1061Rightmost Digit

DescriptionGiven a positive integer N, you should output the most right digit of N^N. InputThe input contains several test cases. The first line of the input is a single integer T

2016-07-31 21:24:10 397

原创 杭电2035 人见人爱A^B

求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1Output对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。 Sample Input2 312 66789 100000 0

2016-07-31 21:22:36 247

原创 poj1995Raising Modulo Numbers

DescriptionPeople are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Windows, and some like difficult mathe

2016-07-31 21:20:49 208

原创 poj3641Pseudoprime numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8854 Accepte

Pseudoprime numbersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8854 Accepted: 3726DescriptionFermat's theorem states that for any prime number p and

2016-07-31 21:19:17 623

原创 杭电5363Key Set

Key SetTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1857    Accepted Submission(s): 973Problem Descriptionsoda has a set S wi

2016-07-31 21:16:37 207

原创 BestCoder Round #85题解报告

sumTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 772    Accepted Submission(s): 363Problem DescriptionGiven a sequence, you're a

2016-07-31 17:23:48 301

原创 百练4120:硬币》.......(还未看懂)

百练 / 练习题目排名等级状态提示提问4120:硬币查看提交统计提示提问总时间限制: 1000ms 内存限制: 262144kB描述宇航员Bob有一天来到火星上,他有收集硬币的习惯。于是他将火星上所有面值的硬币都收集起来了,一共有n种,每种只有一个:面值分别为a1,a2…

2016-07-31 16:05:09 836

原创 Aizu - 0189 Convenient Location(floyd)

Aizu - 0189 Convenient Location(floyd)2016-03-15 22:49 46人阅读 评论(0) 收藏 举报 分类:图(15) 版权声明:本文为博主原创文章,未经博主允许不得转载。目录(?)[+]问题描述来春卒業するAさんは,就職を機に引越しをすることにしまし

2016-07-31 15:15:42 276

原创 floyd算法

Floyd算法是一种典型的动态规划算法其状态方程是dp[i][j][k]=min(dp[i][j][k],dp[i][k][k-1]+dp[k][j][k-1]);很明显,对于一个N个结点的网络,可以设置状态数组为dp[N][N][N]for(i=1;ifor(j=1;jdp[i][j][0]=0;for(k=1;kfor(i=1;ifor(j=1;jdp[i]

2016-07-31 12:04:17 209

原创 poj2377Bad Cowtractors

Bad CowtractorsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13474 Accepted: 5570DescriptionBessie has been hired to build a cheap internet network am

2016-07-31 11:37:14 165

原创 poj2377Bad Cowtractors

Bad CowtractorsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13471 Accepted: 5569DescriptionBessie has been hired to build a cheap internet network am

2016-07-31 09:56:08 210

原创 白练4118开餐馆

百练 / 练习题目排名等级状态提示提问4118:开餐馆查看提交统计提示提问总时间限制: 1000ms 内存限制: 65536kB描述北大信息学院的同学小明毕业之后打算创业开餐馆.现在共有n 个地点可供选择。小明打算从中选择合适的位置开设一些餐馆。这 n 个地点排列在同一条直线上。我们用一个整数序列m1, m2, ...

2016-07-30 21:15:13 260

原创 lightoj1198 - Karate Competition

1198 - Karate Competition   PDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBYour karate club challenged another karate club in you

2016-07-30 20:30:57 223

原创 杭电5586(dp)

SumTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1354    Accepted Submission(s): 684Problem DescriptionThere is a number sequence

2016-07-30 20:03:35 174

原创 杭电1551Cable master

Cable masterTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3857    Accepted Submission(s): 1490Problem DescriptionInhabitants of th

2016-07-30 10:33:36 186

原创 杭电2612Find a way

Find a wayTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo a

2016-07-29 21:38:30 285

原创 poj3278Catch That Cow

Catch That CowTime Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %lluSubmit StatusDescriptionFarmer John has been informed of the location of a fugitive cow

2016-07-29 21:37:16 240

原创 poj2251Dungeon Master(三维bfs)

Dungeon MasterTime Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%lld & %lluSubmit StatusDescriptionYou are trapped in a 3D dungeon and need to find the quickest way

2016-07-29 21:36:05 237

原创 杭电1242Rescue(bfs)

RescueTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The pr

2016-07-29 21:34:08 271

原创 杭电1010Tempter of the Bone(dfs 奇偶剪枝)

Tempter of the BoneTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThe doggie found a bone in an ancient maze, which fascinate

2016-07-28 20:40:54 198

原创 杭电1241Oil Deposits

Oil DepositsTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThe GeoSurvComp geologic survey company is responsible for detecti

2016-07-28 20:35:21 188

原创 杭电1181变形课

变形课Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit StatusDescription呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形

2016-07-28 20:33:47 207

原创 poj3620Avoid The Lakes

Avoid The LakesTime Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%lld & %lluSubmit StatusDescriptionFarmer John's farm was flooded in the most recent storm, a fact

2016-07-28 20:31:46 214

原创 杭电2553N皇后问题(dfs)

N皇后问题Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescription在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任

2016-07-28 20:30:22 266

原创 poj1321棋盘问题(dfs)

棋盘问题Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%lld & %lluSubmit StatusDescription在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和

2016-07-28 20:28:22 310

原创 Multiplication Table

Multiplication TableTime Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionBizon the Champion isn't just charming, he also is very s

2016-07-27 11:17:08 820

原创 Codeforce417C——二分——Hamburgers

HamburgersTime Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionPolycarpus loves hamburgers very much. He especially adores the ham

2016-07-27 09:33:27 302

原创 Codeforces Round #168 (Div. 2) C. k-Multiple Free Set(二分查找)

k-Multiple Free SetTime Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionA k-multiple free set is a set of integers where there is

2016-07-26 20:05:36 309

原创 杭电2141Can you find it?

Can you find it?Time Limit: 10000/3000 MS (Java/Others)    Memory Limit: 32768/10000 K (Java/Others)Total Submission(s): 23488    Accepted Submission(s): 5922Problem DescriptionGive you th

2016-07-26 11:32:30 231

原创 CodeForces 599BSpongebob and Joke

Spongebob and JokeTime Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 599BDescriptionWhile Patrick was gone shopping, S

2016-07-26 09:32:26 257

原创 南阳oj55懒省事的小明

懒省事的小明时间限制:3000 ms  |  内存限制:65535 KB难度:3描述      小明很想吃果子,正好果园果子熟了。在果园里,小明已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆。小明决定把所有的果子合成一堆。 因为小明比较懒,为了省力气,小明开始想点子了:  每一次合并,小明可以把两堆果子合并到一起,消耗的体力等于两堆果子的重量之和。

2016-07-25 21:34:39 390

原创 Codeforces 612C Replace To Make Regular Bracket Sequence 【stack】

C. Replace To Make Regular Bracket Sequencetime limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputYou are give

2016-07-25 21:31:56 166

原创 poj1363Rails

RailsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 31234 Accepted: 12128DescriptionThere is a famous railway station in PopPush City. Country there is

2016-07-25 21:27:22 170

原创 杭电5505GT and numbers(判断一个数通过累乘他的因子是否可以得到另一个数)

GT and numbersTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1793    Accepted Submission(s): 476Problem DescriptionYou are give

2016-07-24 21:28:50 256

原创 poj1061青蛙的约会(exgcd拓展欧几里得)

青蛙的约会Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 105599 Accepted: 20791Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰

2016-07-24 20:41:51 265

原创 poj1026Cipher

CipherTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 21142 Accepted: 5806DescriptionBob and Alice started to use a brand-new encoding scheme. Surprisin

2016-07-23 21:34:11 187

原创 杭电1069Monkey and Banana

C - Monkey and BananaTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionA group of researchers are designing an experiment to tes

2016-07-23 16:54:31 261

原创 杭电1024Max Sum Plus Plus

A - Max Sum Plus PlusTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionNow I think you have got an AC in Ignatius.L's "Max Sum"

2016-07-23 14:21:31 232

转载 贪心算法

贪心算法一、基本概念:      所谓贪心算法是指,在对问题求解时,总是做出在当前看来是最好的选择。也就是说,不从整体最优上加以考虑,他所做出的仅是在某种意义上的局部最优解。     贪心算法没有固定的算法框架,算法设计的关键是贪心策略的选择。必须注意的是,贪心算法不是对所有问题都能得到整体最优解,选择的贪心策略必须具备无后效性,即某个状态以后的过程不会影响以前的状态,只与当前

2016-07-23 09:16:46 298

转载 动态规划

动态规划      一、基本概念    动态规划过程是:每次决策依赖于当前状态,又随即引起状态的转移。一个决策序列就是在变化的状态中产生出来的,所以,这种多阶段最优化决策解决问题的过程就称为动态规划。二、基本思想与策略    基本思想与分治法类似,也是将待求解的问题分解为若干个子问题(阶段),按顺序求解子阶段,前一子问题的解,为后一子问题的求解提供了有用的信息。在求

2016-07-23 09:08:48 178

空空如也

空空如也

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

TA关注的人

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