My thought:
1. Find out the most car can be loaded on ferry(n cars).
2. Using DP(Knapsack way, the length of ferry is the size, just single side) to create the table.
3. Takes car as most as possible and find the most balanced result.

I have tried some test input according to previous posts in forum.
And I thought the output of mine is correct.
I also write a random input generator for testing.
But I still cannot find out that why I got WA.
Can somebody can give me some test data for debug purpose?

I think the issue is with your taken array. One way to solve this using backtracking is:
Keep a visited set on the current index and length of left and right sides of the ferry. If this state has already been visited, then return.
Keep a bool array that lists which side each car goes on for the current state.
Keep a global max_cars and bool array which lists which side each car goes on for the best answer.

Also note that there may be more than 200 cars in the input, you should ignore any after that.