Problem:DescriptionYour task is to judge whether the input is a legal regular expression.A regular expression is defined as follow:1: 0 and 1 are both...
分类:
其他好文 时间:
2015-03-08 21:20:11
阅读次数:
199
uva 165 Stamps
The government of Nova Mareterrania requires that various legal documents have stamps attached to them so that the government can derive revenue from them. In terms of rec...
分类:
其他好文 时间:
2015-03-03 22:17:31
阅读次数:
228
Legal or Not
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4960 Accepted Submission(s): 2270
Problem Description
ACM-DIY is a larg...
分类:
编程语言 时间:
2015-02-20 09:47:27
阅读次数:
131
题意:给出n,m,人的编号为 0到n-1,再给出m个关系,问能不能够进行拓扑排序#include #include #include #include using namespace std;int indegree[1005],queue[1005],head[1005];struct E...
分类:
编程语言 时间:
2015-02-07 10:18:38
阅读次数:
157
hdu 5168 Legal path
题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=5168
题意:
一个有向图,给定起点终点,每条边上有权值。
一条合法的路径定义为相邻边的权值之差不小于K的路径,即路径上每条边的权值至少要比上一条边的权值大K,如果上一条边存在。合法路径的长度定义为路径上的边权值总和。
求从起点到终点的合法路径的...
分类:
其他好文 时间:
2015-02-02 09:40:53
阅读次数:
224
在一个群里面,大家互相请教问题,比如A请教B,我们就把B叫做师傅,把A叫做徒弟,这样会产生很多“师傅——徒弟”的关系,一个徒弟可以有很多的师傅,一个师傅也可以有很多徒弟,这是合法的,但是不能出现A是B的师傅而且B是A的师傅,或者A是B的徒弟而且B是A的徒弟,或者在一个更大的关系环里面出现这种情况。很明显题目的意思就是,判断一个给定的有向图中是否存在环。了解了这些,解题方法就非常简单了,那就是直接进...
分类:
其他好文 时间:
2015-01-25 00:10:59
阅读次数:
204
Legal or Not题目描述:ACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many...
分类:
其他好文 时间:
2015-01-23 16:18:44
阅读次数:
189
写在最前,摘自 K&R
The only legal operations on a structure are copying it or assigning to it as a unit, taking its address with & (读作
ampersand), and accessing its members,
翻译成中文是这样的,对于一个结构体而言,唯一合...
分类:
移动开发 时间:
2015-01-04 21:25:24
阅读次数:
907
题目大意:给你一个有向图,判断是否有环。
思路:构建拓扑排序,如果排序失败,说明该有向图存在有向环。
另一种思路,用链式前向星存储图,在数据输入的同时统计每个点的入度,
并存入indegree数组,每删除一个点,就遍历以这个点为起点的边,将边
对应的入度减1即可选择并删除下一点。用队列来存储已发现的入度为0的
点,更新入度的同时更新这个队列。如果最终得到队列中的元素个数小于
总的元素个数,说明排序失败,存在环。...
分类:
编程语言 时间:
2014-12-19 22:06:40
阅读次数:
264
A bootleg recording is an audio or video recording of a performance that was not officially released by the artist or under other legal authority.[1] ...
分类:
其他好文 时间:
2014-12-11 23:55:28
阅读次数:
382