Problem Description
Cdfpysw loves playing a card game called "Hearthstone". Now he has N cards, he wants to split these cards into 4 piles. Let's assume the number of cards in each pile is a1, a2, a3, a4. It must be satisfied that: a1 * k1 = a2 + a3 + a4 a2 * k2 = a1 + a3 + a4 a3 * k3 = a1 + a2 + a4 a1, a2, a3, a4 must be positive &nbs

本文详细介绍了参与杭电在线判题系统(OJ)第十五届ACM比赛的第一道题目——Hearthstone,主要探讨了使用深度优先搜索(DFS)和回溯算法来解决该问题的方法和思路。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



