上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 43 下一页
摘要: 传送门 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Given a set of constraints like 0<N<=M<=100 and values for all the vari 阅读全文
posted @ 2016-07-26 09:14 Pat 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 传送门 题目大意: 给出平面上的 $n$ 个点,每个点有唯一的标号(label),这 $n$ 个标号的集合记作 $S$,点可能重合。求满足下列条件的 $S$ 的子集 $T$ 的数目: 1. $|T|\ge 2$ 2. $T$中的点共线 Solution: 只包含一种点的符合条件的子集 $T$ 的数目 阅读全文
posted @ 2016-07-21 23:11 Pat 阅读(448) 评论(0) 推荐(0) 编辑
摘要: tetrahedron 传送门 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem DescriptionGiven four points ABCD, if ABCD is 阅读全文
posted @ 2016-07-20 14:52 Pat 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 传送门 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定一个只包含小写字母'a'-'z'的字符串 S ,你需要将 S 中的字符重新排序,使得任意两个相同的字符不连在一起。 如果有多个重排后字符串满足条件,输出字典序最小的一个。 如果不存在满足条件的字符串,输出INV 阅读全文
posted @ 2016-07-15 01:48 Pat 阅读(531) 评论(0) 推荐(0) 编辑
摘要: 有根树 任意指定无根树的某个顶点 $v$ 作为根便得到有根树。下面只讨论有根树。把点 $u$ 和其父亲之间的边称为 $u$ 的父边;除根节点外,点 $u$ 和 $u$ 的父边一一对应。 有根树结构的核心特征是每个节点有唯一前驱,但有多个后继。线性结构的核心特征是每个节点有唯一前驱和唯一后继。若能给每 阅读全文
posted @ 2016-07-08 20:07 Pat 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 最近两天为树形背包问题所困扰。 这一切的起因是一年前在 hackerrank 上做的一道题 A Knapsack Problem。 题目大意是: 给一棵 $N$ 个节点的树,节点 $i$ 代表一件价值为 $v[i]$,体积为 $s[i]$ 的物品。另有一个体积为 $M$ 的背包,要求在树上选一个连通 阅读全文
posted @ 2016-07-05 00:51 Pat 阅读(4121) 评论(2) 推荐(0) 编辑
摘要: Time Limit: 20000MS Memory Limit: 65536K Total Submissions: 1165 Accepted: 110 Case Time Limit: 5000MS Description May is a lovely girl. Due to her fi 阅读全文
posted @ 2016-07-03 00:21 Pat 阅读(434) 评论(0) 推荐(0) 编辑
摘要: (在队友怂恿下写了LeetCode上的一个水题) 传送门 题意 Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" 阅读全文
posted @ 2016-06-17 20:45 Pat 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 传送门 A. Ariel time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output King Triton really likes wa 阅读全文
posted @ 2016-06-06 23:32 Pat 阅读(309) 评论(0) 推荐(1) 编辑
摘要: 传送门 E. Epic Fail of a Genie time limit per test 0.5 seconds memory limit per test 64 megabytes input standard input output standard output Aladdin had 阅读全文
posted @ 2016-06-06 16:47 Pat 阅读(216) 评论(0) 推荐(0) 编辑
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 43 下一页