搜索
Commatc
尽人力,听天命。
展开
-
HDU - 1026 - Ignatius and the Princess I(BFS)Java实现
The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166's castle. The castle is a large labyrinth. To make the problem ...原创 2018-02-06 14:47:07 · 311 阅读 · 0 评论 -
Java实现Tempter of the Bone(DFS+奇偶剪枝)
Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He re...原创 2018-02-06 17:57:19 · 249 阅读 · 0 评论 -
7-12 拯救007(25 分)(dfs)
在老电影“007之生死关头”(Live and Let Die)中有一个情节,007被毒贩抓到一个鳄鱼池中心的小岛上,他用了一种极为大胆的方法逃脱 —— 直接踩着池子里一系列鳄鱼的大脑袋跳上岸去!(据说当年替身演员被最后一条鳄鱼咬住了脚,幸好穿的是特别加厚的靴子才逃过一劫。)设鳄鱼池是长宽为100米的方形,中心坐标为 (0, 0),且东北角坐标为 (50, 50)。池心岛是以 (0, 0) 为...原创 2019-03-20 17:28:47 · 819 阅读 · 3 评论 -
7-1 愿天下有情人都是失散多年的兄妹
呵呵。大家都知道五服以内不得通婚,即两个人最近的共同祖先如果在五代以内(即本人、父母、祖父母、曾祖父母、高祖父母)则不可通婚。本题就请你帮助一对有情人判断一下,他们究竟是否可以成婚?输入格式:输入第一行给出一个正整数N(2 ≤ N ≤104),随后N行,每行按以下格式给出一个人的信息:本人ID 性别 父亲ID 母亲ID其中ID是5位数字,每人不同;性别M代表男性、F代表女...原创 2019-03-25 19:49:34 · 762 阅读 · 0 评论