自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

MissZhou要努力

路漫漫其修远兮,吾将上下而求索

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

原创 uva11090Going in Cycle!!【bellman二分判负环】

Problem G: Going in Cycle!!Input: standard inputOutput: standard output You are given a weighted directed graph with n vertices and m edges. Each cycle in the graph has

2016-03-29 16:46:51 381

原创 Aizu 2249Road Construction 单源最短路变形 spfa模板改写

DescriptionKing Mercer is the king of ACM kingdom. There are one capital and some cities in his kingdom. Amazingly, there are no roads in the kingdom now. Recently, he planned to construct roads b

2016-03-28 21:05:19 1105

原创 hdu4753Fishhead’s Little Game【状态压缩记忆化搜索+博弈】

Problem Description   There is a 3 by 3 grid and each vertex is assigned a number.   It looks like JiuGongGe, but they are different, for we are not going to fill the cell but the edge. For

2016-03-28 09:55:37 694

原创 hdu4323magic number【编辑距离dp】

Problem DescriptionThere are many magic numbers whose lengths are less than 10. Given some queries, each contains a single number, if the Levenshtein distance (see below) between the number in the q

2016-03-27 19:03:01 442

原创 hdu4325 Flowers【树状数组区间更新单点求值 离散化】

Problem DescriptionAs is known to all, the blooming time and duration varies between different kinds of flowers. Now there is a garden planted full of flowers. The gardener wants to know how many fl

2016-03-27 16:29:23 1016

原创 笔试总结——计算机网络篇【持续更新】

返回RST包的各种情况(复位报文—)(连接起来是FIN 未连接起来是RST)1 端口未打 开 服务器程序端口未打开而客户端来连接。这种情况是最为常见和好理解的一种了。去telnet 一个未打开的 TCP 的端口可能会出现这种错误。这个和操作系统的实现有关。在某些情况下,操作系统也会完全不理会这些发到未打开端口请求。比如在下面这种情况下,主机 241

2016-03-26 15:59:00 810

原创 hdu3001Travelling【三进制TSP】

Problem DescriptionAfter coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seeing all the cities!And he does not

2016-03-25 10:38:44 875

原创 poj3311 Hie with the Pie【floyd最短路+状态压缩】

DescriptionThe Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possible. Unfortunately, due to cutbacks, they can afford to hire only one driver to do the deliveri

2016-03-24 20:54:22 763

原创 hdu5025Saving Tang Monk【广搜】

Description《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. It was written by Wu Cheng'en during the Ming Dynasty. In this novel, Monkey King S

2016-03-24 12:37:03 489

原创 笔试总结——数据结构篇【持续更新】

单向链表1.单链表的没个节点都具有唯一的前驱节点和唯一的后继节点,所以当两个单链表存在相交的节点时,这两个链表则同时拥有这个节点,以及这个节点的所有后继节点,当这个公共节点是尾节点时,他们则只含有公共一个节点-------尾节点。2.快慢指针是判断单链表是否有环的一种方法:两个指针,每次移动的步长为2叫做快指针,每次移动步长为1的指针叫做慢指针。快慢指针同时从头结点

2016-03-24 08:33:43 845

原创 poj1185炮兵阵地【状压dp】

Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网格表

2016-03-23 20:48:37 469

原创 笔试总结——c、c++【持续更新】

C语言: char a = 'a'; sizeof(char) = 1 sizeof(a) = 1 sizeof('a') = 4  C++语言: char a = 'a'; sizeof(char) = 1 sizeof(a) = 1 sizeof('a') = 1  字符型变量是1字节这个没错,奇怪就奇怪在C语言认为'a'是4字节,而C++语言认为'a'是1字节。

2016-03-23 19:25:54 622

原创 笔试总结——linux篇【持续更新】

由于本人笔试练习的正确率实在惨不忍睹,于是有了【笔试总结】这个系列,预计会更新至秋招找到工作==unix中进程通信方法(1)管道(Pipe):管道可用于具有亲缘关系进程间的通信,允许一个进程和另一个与它有共同祖先的进程之间进行通信。(2)命名管道(named pipe):命名管道克服了管道没有名字的限制,因此,除具有管道所具有的功能外,它还允许无亲缘关系进程间的通信。命名管道在

2016-03-23 18:28:34 1597

原创 poj2411Mondriaan's Dream【覆盖类状压dp】

DescriptionSquares 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 draw o

2016-03-22 21:13:25 611

原创 poj1062昂贵的聘礼【最短路反向建图】

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

2016-03-22 18:48:49 732

原创 hdu5137How Many Maos Does the Guanxi Worth【最短路最大值】

Problem Description"Guanxi" is a very important word in Chinese. It kind of means "relationship" or "contact". Guanxi can be based on friendship, but also can be built on money. So Chinese often say

2016-03-22 09:32:03 1009

原创 POJ1151 (HDU 1542) Atlantis【矩形面积并,线段树+离散化+扫描线模板】

DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, these map

2016-03-22 08:06:35 1539

原创 hdu 1828 Picture【扫描线求周长模板题】

上周在做ac自动机+dp这种混合的题时,就超不爽的,这周居然要做线段树+几何的题,我的内心上崩溃的o(>﹏既然不是自己做的,总还是要讲讲扫描线是个什么玩意==扫描线,顾名思义,就是用一条线捋着各个边从下到上过一遍,每遍历一个高度的边,累加长度:点击打开链接计算横线部分的方法:现在这次总区间被覆盖的长度和上一次总区间被覆盖的长度的差的绝对值:fabs(a[1].len - pre)计算竖

2016-03-21 21:51:57 608

原创 hdu5122K.Bro Sorting【线段树逆序数】

Problem DescriptionMatt’s friend K.Bro is an ACMer.Yesterday, K.Bro learnt an algorithm: Bubble sort. Bubble sort will compare each pair of adjacent items and swap them if they are in the wrong

2016-03-21 19:48:46 446

转载 Linux中的文件描述符与打开文件之间的关系

由于书上只讲过1,2的文件描述符,其他没写==故~转载请说明出处:http://blog.csdn.net/cywosp/article/details/389652391. 概述    在Linux系统中一切皆可以看成是文件,文件又可分为:普通文件、目录文件、链接文件和设备文件。文件描述符(file descriptor)是内核为了高效管理已被打开的文件所创建的索

2016-03-20 20:52:23 617

原创 hdu4314Save the dwarfs【dp】

Problem DescriptionSeveral dwarfs are trapped in a deep well. They are not tall enough to climb out of the well, so they want to make a human-pyramid, that is, one dwarf stands on another's shoulder

2016-03-19 17:56:30 460

原创 poj2438 Children's Dining【哈密顿图模板题】

DescriptionUsually children in kindergarten like to quarrel with each other. This situation annoys the child-care women. For instant, when diner time comes, a fierce conflict may break out when a

2016-03-19 15:25:23 637

原创 hdu5040Instrusive【广搜】

Problem DescriptionThe legendary mercenary Solid Matt gets a classic mission: infiltrate a military base.The military base can be seen as an N * N grid. Matt's target is in one of the grids and

2016-03-19 10:34:53 368

原创 hdu4758Walk Through Squares【AC自动机+dp】

On the beaming day of 60th anniversary of NJUST, as a military college which was Second Artillery Academy of Harbin Military Engineering Institute before, queue phalanx is a special landscape.    

2016-03-18 16:47:37 540

原创 POJ 2155 Matrix 【二维线段树模板题】

DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 <= i, j <= N).We can change the

2016-03-18 10:51:07 664

原创 Codeforces 405 E. Graph Cutting 【DFS 】

DescriptionLittle 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 v

2016-03-17 21:48:55 573

原创 Hdu 4568 Hunter【spfa最短路 tsp状态压缩】

Description  One day, a hunter named James went to a mysterious area to find the treasures. James wanted to research the area and brought all treasures that he could.  The area can be represen

2016-03-17 17:12:18 926

原创 poj2823Sliding Window【线段树维护滚动区间最值】

DescriptionAn array of size n ≤ 10 6 is given to you. There is a sliding window of sizek which is moving from the very left of the array to the very right. You can only see thek numbers in the

2016-03-17 13:31:12 686

原创 hdu4057 Rescue the Rabbit【AC自动机+dp滚动数组】

DescriptionDr. X is a biologist, who likes rabbits very much and can do everything for them. 2012 is coming, and Dr. X wants to take some rabbits to Noah's Ark, or there are no rabbits any more.

2016-03-16 21:46:22 737

原创 hdu3018Ant Trip【欧拉道路数量 并查集】

DescriptionAnt Country consist of N towns.There are M roads connecting the towns.Ant Tony,together with his friends,wants to go through every part of the country.They intend to visit e

2016-03-16 19:13:05 1550 1

原创 UVALive 4255 Guess【拓扑排序 】

题目转不过来:点击打开链接这个题真是万万没想到是拓扑排序啊啊啊,以为和之前有一个变换质数的题一样是深搜==挑了半天没看出来哪里错了⊙﹏⊙b汗先说拓扑排序是什么来着,这也是扔了几乎半年的知识点==,通过找连着的边,让点的入度减少,入度为0的点入队列,从而形成一条可行路径==这题是白书训练指南310页的例题,“连续和转化为前缀之和”这个性质我想到了,但是没想到正负号就可以确定前后两个前缀和从而在拓

2016-03-15 21:39:34 490

原创 hdu2825Wireless Password【ac自动机+dp状态压缩】

Total Submission(s): 5502    Accepted Submission(s): 1737Problem DescriptionLiyuan lives in a old apartment. One day, he suddenly found that there was a wireless network in the building. Liy

2016-03-15 17:15:16 1561

原创 poj2299Ultra-QuickSort【线段树求逆序数】离散化

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

2016-03-15 16:48:59 1021 3

原创 poj2352Stars【线段树单点更新区间求和】

StarsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 39832 Accepted: 17283DescriptionAstronomers often examine star maps where stars are represented by

2016-03-15 16:33:11 663

原创 poj3093Margaritas on the River Walk【01背包计算方法数】

DescriptionOne of the more popular activities in San Antonio is to enjoy margaritas in the park along the river know as theRiver Walk. Margaritas may be purchased at many establishments along th

2016-03-13 21:05:51 915

原创 hdu3469Watch The Movie【分组背包】二维dp数组

Problem DescriptionNew semester is coming, and DuoDuo has to go to school tomorrow. She decides to have fun tonight and will be very busy after tonight. She like watch cartoon very much. So she want

2016-03-13 16:44:20 725

原创 hdu3033I love sneakers!【分组背包】每组至少取一个

Total Submission(s): 4877    Accepted Submission(s): 2001Problem DescriptionAfter months of hard working, Iserlohn finally wins awesome amount of scholarship. As a great zealot of sneakers,

2016-03-13 13:39:00 1129

原创 hdu1712ACboy needs your help【分组背包入门题】

Problem DescriptionACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from different course depending on the days he spend on it.How to ar

2016-03-13 11:04:48 1523

原创 HDU 3829 - Cat VS Dog【二分图最大匹配最大独立集】

SubmitStatusDescriptionThe zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the child's like-animal is a cat, th

2016-03-12 15:01:39 395

原创 HDU 3836 - Equivalent Sets【强连通分量 基础题】

DescriptionTo prove two sets A and B are equivalent, we can first prove A is a subset of B, and then prove B is a subset of A, so finally we got that these two sets are equivalent.You are to p

2016-03-12 14:52:34 626

空空如也

空空如也

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

TA关注的人

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