DFS
SolitaryOrz
ACM最弱传说
展开
-
Codeforces 931D 【DFS】
D. Peculiar apple-tree In Arcady’s garden there grows a peculiar apple-tree that fruits one time per year. Its peculiarity can be explained in following way: there are n inflorescences, numbered from ...原创 2019-09-21 09:57:14 · 176 阅读 · 0 评论 -
2019牛客国庆集训派对day1 E
Problem E-Numbers_2019牛客国庆集训派对day1 Solution 把一个字符串分割成【0,99】之间的数,不能够有重复,问有多少种切法。 如999可以分割成9和99或者99和9. 解法就是对每一位数都进行dfs,每次选择一位或者两位往下继续dfs,如果不行则返回上一级,这样其实相当于是一种剪枝,当时以为会炸结果赛后跑了一遍发现能过,果然人不能太怂就是干。我的代码太丑了,贴一份...原创 2019-10-02 10:41:50 · 224 阅读 · 1 评论