Epsilon

Stay hungry. Stay foolish.

隐式图--UVA - 1601 The Morning after Halloween

分析:以当前3个小写字母的位置为状态,则问题转化为图的最短路问题。状态总数为256^3,每次转移需要5^3枚举每个小写字母下一步的走法,但是容易超时。由条件“任何一个2×2子网格中至少有一个障碍格”暗示着很多格子都是障碍,并且大部分空地都和障碍相邻,因此不是所有4个方向都能移动,因此可以把所有空格...

2015-10-31 19:22:27

阅读数:466

评论数:0

隐式图--UVA - 10603 Fill

分析:假设在某个时刻,第1个杯子中有v0升水,第2个杯子中有v1升水,第3个杯子中有v2升水,称当时的系统状态为(v0,v1,v2);把‘状态’看成图中的结点,可以得到状态转移图;由于无论如何倒,杯子中的水量都是整数,因此第3个杯子的水量最多只有0,1,2,3 ... ,c共c+1种可能,同理,第...

2015-10-31 13:48:21

阅读数:475

评论数:0

八数码--HDU - 1043 Eight

Description The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sl...

2015-10-31 11:44:19

阅读数:324

评论数:0

贪心--HDU - 4221 Greedy?

Description iSea is going to be CRAZY! Recently, he was assigned a lot of works to do, so many that you can't imagine. Each task costs Ci time as ...

2015-10-31 00:42:09

阅读数:797

评论数:0

贪心--HDU - 4310 Hero

Description When playing DotA with god-like rivals and pig-like team members, you have to face an embarrassing situation: All your teammates are k...

2015-10-31 00:14:54

阅读数:444

评论数:0

贪心-- HDU - 4296 Buildings

Description   Have you ever heard the story of Blue.Mary, the great civil engineer? Unlike Mr. Wolowitz, Dr. Blue.Mary has accomplished many great...

2015-10-30 23:56:06

阅读数:467

评论数:0

贪心--HDU - 4442 Physical Examination

Input There are several test cases. Each test case starts with a positive integer n in a line, meaning the number of subjects(queues).  Then n li...

2015-10-30 23:16:40

阅读数:384

评论数:0

ZOJ - 1489 2^x mod n = 1

Description Give a number n, find the minimum x that satisfies 2^x mod n = 1. Input One positive integer on each line, the value...

2015-10-30 22:01:38

阅读数:387

评论数:0

哈希--ZOJ - 3844 Easy Task

Description You are given n integers. Your task is very easy. You should find the maximum integer a and the minimum integer b among these ninteger...

2015-10-30 20:58:53

阅读数:375

评论数:0

凸包--HDU - 3285 Convex Hull of Lattice Points

Description A lattice point is a point with integer coordinates. A lattice polygon is a polygon with all vertices lattice points.  A polygon is...

2015-10-29 15:11:50

阅读数:457

评论数:0

并查集--HDU - 3926 Hand in Hand

Description In order to get rid of Conan, Kaitou KID disguises himself as a teacher in the kindergarten. He knows kids love games and works out a ne...

2015-10-29 11:37:33

阅读数:357

评论数:0

Linux操作系统中,*.zip、*.tar、*.tar.gz、*.tar.bz2、*.tar.xz、*.jar、*.7z等格式的压缩与解压

zip格式 压缩: zip -r [目标文件名].zip [原文件/目录名] 解压: unzip [原文件名].zip 注:-r参数代表递归 tar格式(该格式仅仅打包,不压缩) 打包:tar -cvf [目标文件名].tar [原文件名/目录名] 解包:tar -xv...

2015-10-29 10:55:47

阅读数:4264

评论数:1

并查集-- HDU - 4263 Red/Blue Spanning Tree

Description Given an undirected, unweighted, connected graph, where each edge is colored either blue or red, determine whether a spanning tree with ...

2015-10-29 10:23:02

阅读数:419

评论数:0

并查集--HDU - 4313 Matrix

Description Machines have once again attacked the kingdom of Xions. The kingdom of Xions has N cities and N-1 bidirectional roads. The road networ...

2015-10-29 09:29:51

阅读数:389

评论数:0

并查集--HDU - 4496 D-City

Description Luxer is a really bad guy. He destroys everything he met.  One day Luxer went to D-city. D-city has N D-points and M D-lines. Each D-...

2015-10-29 08:41:50

阅读数:364

评论数:0

并查集--POJ - 2524 Ubiquitous Religions

Description 当今世界有很多不同的宗教,很难通晓他们。你有兴趣找出在你的大学里有多少种不同的宗教信仰。 你知道在你的大学里有n个学生(0 Input 有多组数据。对于每组数据: 第一行:两个整数n和m。 以下m行:每行包含两个整数i和j,表示学生i和...

2015-10-28 23:51:45

阅读数:333

评论数:0

Ubuntu 安装 flash插件

flash下载地址 如果是ubuntu选择apt方式,点击发现软件库找不到flash 这里是解决方案 大意是更新源,但是报错:下载软件库信息失败 这里是解决方案 具体过程如下: 编辑 /etc/apt/sources.list 注释 deb http://ex...

2015-10-28 20:54:17

阅读数:377

评论数:0

并查集--POJ - 1611 The Suspects

Description 严重急性呼吸系统综合症( SARS), 一种原因不明的非典型性肺炎,从2003年3月中旬开始被认为是全球威胁。为了减少传播给别人的机会, 最好的策略是隔离可能的患者。 在Not-Spreading-Your-Sickness大学( NSYSU), 有许多学生团体。同一组的...

2015-10-28 00:24:34

阅读数:474

评论数:0

精华--CentOS多网卡配置

事情是这样的,我之前在windows用vmware建了一个centos,现在ubuntu开发,要用到之前的虚拟机,所以下了个vmware10, 因为文件格式来自于同一款软件,所以ubuntu下可以使用windows创建的虚拟机。顺利开机让我略感兴奋,当我配置完ssh后发现ip地址变了,然后我决定配...

2015-10-26 10:00:58

阅读数:1036

评论数:0

Linux回收站管理

linux下的回收站在每一个当前用户目录./local/share/Trash中  ($HOME/.local/share/Trash/files/*) 也可以给linux添加一个回收站。 1、mkdir /tmp/trash_tmp 建立一个回收站目录 2、vi /bin/trash 编辑一个文...

2015-10-26 08:23:11

阅读数:672

评论数:0

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