Sometimes even a simple string param may have redundant spaces like sample 2 in BagAndCards (SRM 679). Always trim first when parsing params will fix this.
The incorrect BagAndCards.sample is given below. Note that there is a trailing space in sample 2.
I have debugged my solution for quite a while and found this bug in Greed during the contest...QQ
Sometimes even a simple string param may have redundant spaces like sample 2 in BagAndCards (SRM 679). Always trim first when parsing params will fix this.
The incorrect
BagAndCards.sample
is given below. Note that there is a trailing space in sample 2.I have debugged my solution for quite a while and found this bug in Greed during the contest...QQ