tkzc @ 2018-11-02 08:28:50
蒟蒻想问下这题能不能用记忆话搜索做出来^_^
by jeffqi @ 2018-11-02 08:31:19
能 我的就是
by jeffqi @ 2018-11-02 08:32:41
不过我用拓扑直接算出了顺序
by tkzc @ 2018-11-02 15:25:42
@jeffyang
这两天一直在搞记忆话搜索怎么记录答案,还请大佬指点指^_^
by jeffqi @ 2018-11-02 15:26:27
@tkzc 像dp一样就行了啊
by tkzc @ 2018-11-02 15:28:51
@jeffyang
但你写的是没有返回值的函数啊
by jeffqi @ 2018-11-02 15:33:48
@tkzc 计搜是从根到儿子再从儿子传值回根 我写拓扑只是为了直接算出儿子后从儿子回根
by jeffqi @ 2018-11-02 15:34:19
@tkzc 其实是一样的
by tkzc @ 2018-11-02 15:51:45
@jeffyang
涨知识了,记忆化搜索还能这样,那有返回值写法和你那样的写法你感觉哪个好啊(或者说好写点
by jeffqi @ 2018-11-02 15:55:31
@tkzc 记搜好写点 我那个不用递归
by tkzc @ 2018-11-02 16:47:23
@jeffyang
好强啊大佬%%%