I have a shell script
tests.sh, that you can use to test your program. When you
run tests.sh, your answer should be identical to
answers.txt. The shell script should take well under a second.
Hints
At 1199 submissions, a 97% success rate, and an average score of 227.77, this has to be one
of the easiest Topcoder problems in history. I would hope that you get it in under five minutes.
If you want help, keep reading, but I urge you to figure this one out on your own.
When do you change a character?
When its index is less than S.size()/2, and it is not a '>'.
When its index is greater than or equal to S.size()/2, and it is not a '<'.