“Chicken-Rabbit Math Problem (雞兔同籠)” is an ancient Chinese math problem. Known the total number of heads and feet, we may tell the number of chickens and the number of rabbits respectively by solving the problem.
Let's upgrade our math problem a little bit into an alien version. Now, we have several alien chickens and alien rabbits in a same cage. Although each kind of alien chicken and alien rabbit has a different number of heads and feet, we can still get the answer by slightly changing our previos algorithm for the typical“Chicken-Rabbit Math Problem”.
To solve this alien-version problem by programming, we still can use brute-force algorithm (暴力演算法) to find out the answer directly. However, specially note, there may be serveral solutions in a same case.
Read and understand the code in main.cpp, function.h, and implment your brute-force algorithm ChickenNRabbitProblem::Solve(int chicken_h, int chicken_f, int rabbit_h, int rabbit_f) in function.cpp.
Hint:
The structure is look like the figure below.

Only need to implement two methods:
Use ChickenNRabbit-Problem::CheckSolution(), ChickenNRabbitProblem::PrintSolution() and functions in class ChickenCounter, RabbitCounter for help.
total_head_num total_feet_num
chicken_head chicken_feet
rabbit_head rabbit_feet
note: total_head_num and total_feet_num are integers, represent as the target total number of head and feet respectively. Also, chicken_head, chicken_feet, rabbit_head, rabbit_feet are integers, represents as the number of alien chicken’s head and feet and the number of alien rabbit’s head and feet, respectively
Output should follow below format:
Chicken: chicken_num_1, Rabbit: rabbit_num_1
Chicken: chicken_num_2, Rabbit: rabbit_num_2
…
Chicken: chicken_num_n, Rabbit: rabbit_num_n
note: print out all the answers of the Chicken-Rabbit Problem (sort by the number of chickens from small to large). If there are no solutions, print “no solutions” instead.