sgf87

2010年4月27日

zoj 1003 深度优先DFS

摘要: On every June 1st, the Children's Day, there will be a game named "crashing balloon" on TV. The rule is very simple.On the ground there are 100 labeled balloons, with the numbers 1 to 100.After the re... 阅读全文

posted @ 2010-04-27 20:54 sgf87 阅读(698) 评论(1) 推荐(0) 编辑

zoj 1004 回溯啊,牛~~

摘要: 一题就是要把一个输入串仅仅通过栈的入栈和出栈操作转化为另一个串。初看此题,我感觉非常难以下手,不知道该如何是好。 仔细分析题目中的两个串之间有什么规律,时间花了很多的,但是一点效果都没有。请教了一位ACM很牛的同学。他马上就说了一句话,直击题目的核心。就是你不用电脑,只用纸和笔,你会怎么算呢?是的,如果我只用纸和笔,我会怎么做呢?我想对于madam和adamm这两个串来说,当然就是先入m,然后在入... 阅读全文

posted @ 2010-04-27 20:44 sgf87 阅读(494) 评论(0) 推荐(0) 编辑

导航