2677.---Get-Many-Persimmon-Trees is a project mainly written in Python, it's free.
I had to solve this problem for an internship apply
problem solved : http://acm.tju.edu.cn/toj/showp2677.html