自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

猿的进化

ACM~java~web~密码学

  • 博客(24)
  • 收藏
  • 关注

原创 hdu2577

M - How to TypeTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionPirates have finished developing the typing software. He called Cat

2016-05-26 19:23:13 936

原创 hdu2514

L - FATETime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescription最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这

2016-05-25 15:11:19 425

原创 51nod1084 更难难得矩阵取数问题

分析: 只走一次的问题我们之前分析过。现在要走两次,有什么好办法呢? 我们设想,有两个人都从左上角走到右下角,这和走到终点再返回是一样的,我们可以dp么?怎么dp?先看看按照之前那种方法dp两次行不行? 看下图:如果第一条路径先找最优的,就要走路径(1,1)->(1,2)->(1,3)->(2,3)->(3,3)->(3,4)->(3,5)->(4,5)->(5,5)。但是这样

2016-05-24 18:42:05 834

原创 CodeForces 589J ——2015-2016 ACM-ICPC, NEERC, Southern Subregional Contest

J - Cleaner RobotTime Limit:2000MS     Memory Limit:524288KB     64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 589JDescriptionMasha has recently bought a cleaner

2016-05-24 11:28:40 611

原创 java计算器

package p1;import java.awt.BorderLayout;import java.awt.Font;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;impor

2016-05-19 17:09:50 376

原创 hdu5188限制01背包

zhx and contestTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 731    Accepted Submission(s): 271Problem DescriptionAs one of th

2016-05-19 11:48:27 408

原创 S-DES加密

#include #include #include using namespace std;void P10_(int K[],int P10[],int K0[]){ for(int i=1;i<=10;i++) K0[i]=K[P10[i]];}void P8_(int K[],int P8[],int K0[]){ for(int i=1;i<=8;

2016-05-17 21:12:25 1790

原创 hdu1712分组背包

B - ACboy needs your helpTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionACboy has N courses this term, and he plans to spend at m

2016-05-17 20:25:08 268

原创 poj1276多重背包

D - Cash MachineTime Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 1276DescriptionA Bank plans to install a machine for cash

2016-05-17 20:14:32 270

原创 01背包第k大价值hdu2639

A - Bone Collector IITime Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThe title of this problem is familiar,isn't it?yeah,if you

2016-05-17 17:04:18 517

原创 多重背包

多重背包转化成01背包;怎么转化 ??,每个物品有k件,k可以写成1,2,4,8,,,的和的形式,以这些2的几次幂的数可以组合得到 1-k每个数,这样将一个物品化成多个物品,然后每个  物品取与不取,变成01背包;我们试试看,比如Ci  = 14,我们可以把它化成如下4个物品:重量是Wi,体积是Vi重量是2 * Wi , 体积是2 * Vi重量是4 * Wi ,

2016-05-16 10:39:09 272

原创 循环最大子段和

循环最大字段和等于          max  (普通最大字段和,  sum-最小子段和)因为总和是一定的,当最小子段在中间部分(不包含头尾)时,最大子段和等于总和-最小子段和;输入第1行:整数序列的长度N(2 <= N <= 50000)第2 - N+1行:N个整数 (-10^9 输出输出循环数组的最大子段和。

2016-05-07 21:38:45 263

原创 最大子段和的以为与二维求解

一维最大子段和很简单int ans=0,dp=0;for(int i=1;i<n;i++) if(dp>0) dp+=a[i]; else dp=a[i];输入第1行:M和N,中间用空格隔开(2 <= M,N <= 500)。第2 - N + 1行:矩阵中的元素,每行M个数,中间用空格隔开。(-10^9 输出

2016-05-07 21:15:04 442

原创 51nod1459 迷宫游戏

你来到一个迷宫前。该迷宫由若干个房间组成,每个房间都有一个得分,第一次进入这个房间,你就可以得到这个分数。还有若干双向道路连结这些房间,你沿着这些道路从一个房间走到另外一个房间需要一些时间。游戏规定了你的起点和终点房间,你首要目标是从起点尽快到达终点,在满足首要目标的前提下,使得你的得分总和尽可能大。现在问题来了,给定房间、道路、分数、起点和终点等全部信息,你能计算在尽快离开迷宫的前提下,你的最大

2016-05-07 16:47:39 890

原创 hdu4286

C - You Are the OneTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescription  The TV shows such as You Are the One has been very popular. I

2016-05-07 11:39:21 633

原创 uva315

A - NetworkTime Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %lluSubmit StatusDescriptionA Telephone Line Company (TLC) is establishing a new telephone cable netw

2016-05-06 21:24:51 786

原创 hdu4745区间dp

B - Two RabbitsTime Limit:5000MS     Memory Limit:65535KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionLong long ago, there lived two rabbits Tom and Jerry in the fores

2016-05-06 21:12:47 306

原创 codeforce 22#div2E

题目大意给了 n(25) 个点,从每个点 u 出发连向了一个点 v(共 n 条边)现在要求添加最少的边使得整个图是一个强连通图做法分析 这道题千万不要一般化:先求强连通分量再把图化为 DAG 来做(我们能够很方便的得到需要添加的边的数量,但是加哪些边会变得很麻烦)注意一个细节:每个点的出度必为 1有什么特点?        从一个点

2016-05-06 18:24:15 691

原创 hdu4635

B - Strongly connectedTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionGive a simple directed graph with N nodes and M edges. Ple

2016-05-05 14:43:20 338

原创 hdu5546

Ancient GoTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 799    Accepted Submission(s): 283Problem DescriptionYu Zhou likes to

2016-05-05 10:30:43 356

原创 nefu1132

Cost of travelingProblem:1132Time Limit:1000msMemory Limit:65535KDescriptionXiao Ming is in a bad mood these days.So he wants to relieve himself

2016-05-05 08:53:43 316

原创 hdu4293

D - GroupsTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 4293Description  After the regional contest, all the ACMers are wal

2016-05-03 21:47:03 446

原创 S-DES子密钥产生

#include #include #include using namespace std;void P10_(int K[],int P10[],int K0[]){ for(int i=1;i<=10;i++) K0[i]=K[P10[i]];}void P8_(int K[],int P8[],int K0[]){ for(int i=1;i<=8;

2016-05-03 19:26:54 2862 1

原创 nefu1162

Single boyProblem:1162Time Limit:5000msMemory Limit:65535KDescriptionToday is Christmas day. There are n single boys standing in a line. They ar

2016-05-03 10:42:59 312

空空如也

空空如也

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

TA关注的人

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