In the official solution, the method of this problem is described as below:
Click to see the method
But, what the f**k is the official standard code writing! It is considering a word is nice if the number of occurrences of A
and B
is even. It didn't even use a stack as the method above mentioned!
Click to see the official standard code
9 years passed and didn't even a single person mentioned this mistake???
You are right of course, it doesn't even pass the first sample, weird...
then implement it by yourself you are not going to improve by looking at the code of the solution.
Where can I find/submit old COCI problems? I know oj.uz has 2015 onwards, but definitely not 2012/2013.
DMOJ has some of them.
evaluator.hsin.hr -> Tasks -> HONI, for example this task Esej. You have to create a COCI account to access it.