自定义博客皮肤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~密码学

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

原创 单向链表排序

#include #include #include using namespace std;struct ac{ int date; struct ac *next;};void sort1(struct ac *head,int T)//其实 就是冒泡{ ac *tmp,*p,*q; ac *a,*b; p=head;//把链首给p

2016-03-30 20:43:15 588

原创 数据结构单链表删除相同元素(int)

#include #include #include using namespace std;struct node{ int date; node *next;};int main(){ node *head,*L,*p; int n; cin>>n; int x; for(int i=1;i<=n;i++) {

2016-03-30 20:30:52 804

原创 hdu4786-图论训练3-最小生成树

D - Fibonacci TreeTime Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescription  Coach Pang is interested in Fibonacci numbers while Uncle Ya

2016-03-29 21:22:12 319

原创 单源最短路径+最小花费生成树

A - Road ConstructionTime Limit:8000MS     Memory Limit:65536KB     64bit IO Format:%lld & %lluSubmit StatusDescriptionKing Mercer is the king of ACM kingdom. There are one capital a

2016-03-29 21:09:20 1589

原创 查分约束uva

You are given a weighted directed graph with n vertices and m edges. Each cycle in the graph has aweight, which equals to sum of its edges. There are so many cycles in the graph with different weigh

2016-03-29 20:57:26 453

原创 IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2)

A. Bear and Three Ballstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLimak is a little polar bear. He ha

2016-03-27 21:15:19 320

原创 编辑距离问题

给定两个字符串S和T,对于T我们允许三种操作:(1) 在任意位置添加任意字符(2) 删除存在的任意字符(3) 修改任意字符 问最少操作多少次可以把字符串T变成S? 例如: S=  “ABCF”   T = “DBFG”那么我们可以(1) 把D改为A(2) 删掉G(3) 加入C所以答案是3。分析: 这个最少的操作

2016-03-27 20:53:55 497

原创 hdu5652

India and China OriginsTime Limit: 2000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 628    Accepted Submission(s): 212Problem DescriptionA lo

2016-03-27 18:54:55 745

原创 poj3001

D - TravellingTime Limit:3000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 3001DescriptionAfter coding so many days,Mr Acmer wants to ha

2016-03-27 16:25:52 404

原创 poj3311

B - Hie with the PieTime Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThe Pizazz Pizzeria prides itself in delivering pizzas to

2016-03-26 21:00:23 390

原创 dp训练2C---poj1185

C - 炮兵阵地Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit StatusDescription司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是

2016-03-26 20:54:07 273

原创 poj1062——图论训练2B

B - 昂贵的聘礼Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64uSubmit StatusDescription年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险

2016-03-24 21:51:22 802

转载 poj2411状态压缩dp训练2——A

图论训练2---ADescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to

2016-03-24 10:36:12 355

原创 图论训练2C——hdu5137

C - How Many Maos Does the Guanxi WorthTime Limit:1000MS     Memory Limit:512000KB     64bit IO Format:%I64d & %I64uSubmit StatusDescription"Guanxi" is a very important word in Chi

2016-03-22 16:36:04 418

原创 hdu5025

Saving Tang MonkTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1889    Accepted Submission(s): 671Problem Description《Journey t

2016-03-22 14:45:57 340

原创 dp专题1,,hdu4568

),英雄互娱(杭州)HunterTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1671    Accepted Submission(s): 504Problem Description

2016-03-20 19:35:52 282

原创 图论1E,cf405E

Little Chris is participating in a graph cutting contest. He's a pro. The time has come to test his skills to the fullest.Chris is given a simple undirected connected graph with n vertices (numbered

2016-03-19 10:20:43 321

原创 poj2253

B - FroggerTime Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 2253DescriptionFreddy Frog is sitting on a stone in the middle

2016-03-19 09:16:28 368

转载 欧拉回路模板

#include#includeconst int MAXN=111;using namespace std;stackS;int edge[MAXN][MAXN];int n,m;void dfs(int x){ S.push(x); for(int i=1;i<=n;i++){ if(edge[x][i]>0){ edg

2016-03-18 20:01:05 1025

原创 poj2438 哈密顿图

Children's DiningTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4429 Accepted: 637 Special JudgeDescriptionUsually children in kindergarten like to

2016-03-18 19:54:48 747

原创 hdu5040

InstrusiveTime Limit: 3000/1500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1564    Accepted Submission(s): 465Problem DescriptionThe legendary mercenary Soli

2016-03-17 10:30:59 695 1

原创 图论训练1A,uva4255 拓扑排序

Given a sequence of integers, a1, a2,..., an , we define its sign matrix S such that, for 1ijn , Sij = `` + " if ai +...+ aj > 0 ; Sij = `` - " ifai +...+ aj  ; and Sij = ``0" otherwise.For ex

2016-03-16 21:52:11 445

转载 八大排序

版权声明:本文为博主原创文章,未经博主允许不得转载。目录(?)[-]概述1插入排序直接插入排序Straight Insertion Sort 2 插入排序希尔排序Shells Sort3 选择排序简单选择排序Simple Selection Sort4 选择排序堆排序Heap Sort5 交换排序冒泡排序Bubble Sort6 交换排序快速排序Quick Sort7

2016-03-15 20:48:00 293

原创 fzu2150 搜索

I - Fire GameTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice FZU 2150DescriptionFat brother and Maze are playing a kind of specia

2016-03-15 14:01:56 362

原创 图论训练一B

B - Ant TripTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionAnt Country consist of N towns.There are M roads connecting the town

2016-03-15 13:43:49 333

原创 hdu3836

Equivalent SetsTime Limit: 12000/4000 MS (Java/Others)    Memory Limit: 104857/104857 K (Java/Others)Total Submission(s): 3751    Accepted Submission(s): 1308Problem DescriptionTo prov

2016-03-13 18:54:54 632

原创 hdu3829

B - Cat VS DogTime Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 3829DescriptionThe zoo have N cats and M dogs, today there are

2016-03-12 21:22:07 555

原创 poj3061

SubsequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10937 Accepted: 4524DescriptionA sequence of N positive integers (10 < N < 100 000), each of

2016-03-11 20:11:35 401

原创 poj3984

K - 迷宫问题Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 3984Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0,

2016-03-11 14:36:39 255

原创 uva11624

http://acm.hust.edu.cn/vjudge/contest/view.action?cid=65959#problem/J发个题目链接吧,文章复制不成功,就是给一个二维图,#  .    F   J  ,# 表示墙,.表示路,F表示火,J表示人,二者都是每次移动一格,(上下左右),F可能会有多个,问人是否可以走出来,只要走到边就算走出来了,解决,bfs搜索,队列实现

2016-03-11 14:31:22 472

原创 hdu1495

M - 非常可乐Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1495Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可

2016-03-10 21:38:34 570

原创 poj2251 搜索

B - Dungeon MasterTime Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 2251DescriptionYou are trapped in a 3D dungeon and need t

2016-03-10 21:31:40 261

原创 hdu2616搜索

N - Find a wayTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2612DescriptionPass a year learning in Hangzhou, yifenfei arr

2016-03-10 21:29:54 261

原创 poj3469最大流(最大割)

Dual Core CPUTime Limit: 15000MS Memory Limit: 131072KTotal Submissions: 22059 Accepted: 9587Case Time Limit: 5000MSDescriptionAs more and more computers ar

2016-03-10 09:41:02 404

原创 hdu4292 网络流 —最大流

FoodTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4364    Accepted Submission(s): 1475Problem Description  You, a part-time di

2016-03-09 18:34:13 326

原创 hdu1087最大流

A Plug for UNIXTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15409 Accepted: 5224DescriptionYou are in charge of setting up the press room for the ina

2016-03-09 17:55:08 265

原创 hdu2255二分图最大权匹配

一体”全攻略! 招聘——巴卡斯科技(杭州)、英雄互娱(杭州)奔小康赚大钱Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6340    Accepted Submission(s): 2789

2016-03-08 21:11:14 444

原创 最小树形图uva11183

Problem ITeen Girl Squad Input: Standard Input Output: Standard Output You are part of a group of n teenage girls armed with cellphones. You have some news you want to tell everyone in the gro

2016-03-08 15:58:23 266

空空如也

空空如也

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

TA关注的人

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